mirror of
https://github.com/ppy/osu.git
synced 2024-11-13 19:27:31 +08:00
Merge branch 'master' into editor-screen-selection
This commit is contained in:
commit
eed358a2c1
@ -80,7 +80,7 @@ namespace osu.Game.Online.API.Requests
|
|||||||
}
|
}
|
||||||
|
|
||||||
[JsonProperty(@"statistics")]
|
[JsonProperty(@"statistics")]
|
||||||
private Dictionary<string, dynamic> jsonStats
|
private Dictionary<string, object> jsonStats
|
||||||
{
|
{
|
||||||
set
|
set
|
||||||
{
|
{
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
using osu.Framework;
|
|
||||||
using OpenTK.Graphics;
|
using OpenTK.Graphics;
|
||||||
using osu.Framework.Extensions.Color4Extensions;
|
using osu.Framework.Extensions.Color4Extensions;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
@ -165,10 +164,8 @@ namespace osu.Game.Overlays
|
|||||||
wavesContainer.Height = Math.Max(0, DrawHeight - (contentContainer.DrawHeight - contentContainer.Y));
|
wavesContainer.Height = Math.Max(0, DrawHeight - (contentContainer.DrawHeight - contentContainer.Y));
|
||||||
}
|
}
|
||||||
|
|
||||||
private class Wave : Container, IStateful<Visibility>
|
private class Wave : VisibilityContainer
|
||||||
{
|
{
|
||||||
public event Action<Visibility> StateChanged;
|
|
||||||
|
|
||||||
public float FinalPosition;
|
public float FinalPosition;
|
||||||
|
|
||||||
public Wave()
|
public Wave()
|
||||||
@ -183,13 +180,7 @@ namespace osu.Game.Overlays
|
|||||||
Radius = 20f,
|
Radius = 20f,
|
||||||
};
|
};
|
||||||
|
|
||||||
Children = new Drawable[]
|
Child = new Box { RelativeSizeAxes = Axes.Both };
|
||||||
{
|
|
||||||
new Box
|
|
||||||
{
|
|
||||||
RelativeSizeAxes = Axes.Both,
|
|
||||||
},
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void Update()
|
protected override void Update()
|
||||||
@ -201,28 +192,8 @@ namespace osu.Game.Overlays
|
|||||||
Height = Parent.Parent.DrawSize.Y * 1.5f;
|
Height = Parent.Parent.DrawSize.Y * 1.5f;
|
||||||
}
|
}
|
||||||
|
|
||||||
private Visibility state;
|
protected override void PopIn() => this.MoveToY(FinalPosition, APPEAR_DURATION, easing_show);
|
||||||
|
protected override void PopOut() => this.MoveToY(Parent.Parent.DrawSize.Y, DISAPPEAR_DURATION, easing_hide);
|
||||||
public Visibility State
|
|
||||||
{
|
|
||||||
get { return state; }
|
|
||||||
set
|
|
||||||
{
|
|
||||||
state = value;
|
|
||||||
|
|
||||||
switch (value)
|
|
||||||
{
|
|
||||||
case Visibility.Hidden:
|
|
||||||
this.MoveToY(Parent.Parent.DrawSize.Y, DISAPPEAR_DURATION, easing_hide);
|
|
||||||
break;
|
|
||||||
case Visibility.Visible:
|
|
||||||
this.MoveToY(FinalPosition, APPEAR_DURATION, easing_show);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
StateChanged?.Invoke(State);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -38,6 +38,6 @@ namespace osu.Game.Rulesets.Scoring
|
|||||||
|
|
||||||
public DateTimeOffset Date;
|
public DateTimeOffset Date;
|
||||||
|
|
||||||
public Dictionary<string, dynamic> Statistics = new Dictionary<string, dynamic>();
|
public Dictionary<string, object> Statistics = new Dictionary<string, object>();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -186,9 +186,9 @@ namespace osu.Game.Screens.Ranking
|
|||||||
|
|
||||||
private class DrawableScoreStatistic : Container
|
private class DrawableScoreStatistic : Container
|
||||||
{
|
{
|
||||||
private readonly KeyValuePair<string, dynamic> statistic;
|
private readonly KeyValuePair<string, object> statistic;
|
||||||
|
|
||||||
public DrawableScoreStatistic(KeyValuePair<string, dynamic> statistic)
|
public DrawableScoreStatistic(KeyValuePair<string, object> statistic)
|
||||||
{
|
{
|
||||||
this.statistic = statistic;
|
this.statistic = statistic;
|
||||||
|
|
||||||
|
@ -9,6 +9,7 @@ using osu.Framework.Graphics.UserInterface;
|
|||||||
using osu.Game.Graphics.UserInterface;
|
using osu.Game.Graphics.UserInterface;
|
||||||
using OpenTK;
|
using OpenTK;
|
||||||
using OpenTK.Graphics;
|
using OpenTK.Graphics;
|
||||||
|
using osu.Game.Graphics.Cursor;
|
||||||
|
|
||||||
namespace osu.Game.Tests.Visual
|
namespace osu.Game.Tests.Visual
|
||||||
{
|
{
|
||||||
@ -23,32 +24,32 @@ namespace osu.Game.Tests.Visual
|
|||||||
|
|
||||||
public TestCaseContextMenu()
|
public TestCaseContextMenu()
|
||||||
{
|
{
|
||||||
Add(container = new MyContextMenuContainer
|
Add(new OsuContextMenuContainer
|
||||||
{
|
{
|
||||||
Size = new Vector2(200),
|
RelativeSizeAxes = Axes.Both,
|
||||||
Anchor = Anchor.Centre,
|
|
||||||
Origin = Anchor.Centre,
|
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
new Box
|
container = new MyContextMenuContainer
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
Size = new Vector2(200),
|
||||||
Colour = Color4.Green,
|
Anchor = Anchor.Centre,
|
||||||
}
|
Origin = Anchor.Centre,
|
||||||
}
|
Child = new Box
|
||||||
});
|
{
|
||||||
|
RelativeSizeAxes = Axes.Both,
|
||||||
Add(new AnotherContextMenuContainer
|
Colour = Color4.Green,
|
||||||
{
|
}
|
||||||
Size = new Vector2(200),
|
},
|
||||||
Anchor = Anchor.CentreLeft,
|
new AnotherContextMenuContainer
|
||||||
Origin = Anchor.CentreLeft,
|
|
||||||
Children = new Drawable[]
|
|
||||||
{
|
|
||||||
new Box
|
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
Size = new Vector2(200),
|
||||||
Colour = Color4.Red,
|
Anchor = Anchor.CentreLeft,
|
||||||
|
Origin = Anchor.CentreLeft,
|
||||||
|
Child = new Box
|
||||||
|
{
|
||||||
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
Colour = Color4.Red,
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -124,7 +124,6 @@
|
|||||||
<HintPath>$(SolutionDir)\packages\DotNetZip.1.10.1\lib\net20\DotNetZip.dll</HintPath>
|
<HintPath>$(SolutionDir)\packages\DotNetZip.1.10.1\lib\net20\DotNetZip.dll</HintPath>
|
||||||
<Private>True</Private>
|
<Private>True</Private>
|
||||||
</Reference>
|
</Reference>
|
||||||
<Reference Include="Microsoft.CSharp" />
|
|
||||||
<Reference Include="Mono.Cecil, Version=0.9.6.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756, processorArchitecture=MSIL">
|
<Reference Include="Mono.Cecil, Version=0.9.6.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756, processorArchitecture=MSIL">
|
||||||
<HintPath>$(SolutionDir)\packages\Mono.Cecil.0.9.6.4\lib\net45\Mono.Cecil.dll</HintPath>
|
<HintPath>$(SolutionDir)\packages\Mono.Cecil.0.9.6.4\lib\net45\Mono.Cecil.dll</HintPath>
|
||||||
<Private>True</Private>
|
<Private>True</Private>
|
||||||
|
Loading…
Reference in New Issue
Block a user