mirror of
https://github.com/osukey/osukey.git
synced 2025-08-05 07:33:55 +09:00
Re-implement statistics as a click-in panel
This commit is contained in:
@ -1,17 +1,17 @@
|
||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using osu.Framework.Extensions.Color4Extensions;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Shapes;
|
||||
using osu.Game.Scoring;
|
||||
using osuTK;
|
||||
|
||||
namespace osu.Game.Screens.Ranking.Statistics
|
||||
{
|
||||
public class StatisticsPanel : CompositeDrawable
|
||||
public class StatisticsPanel : VisibilityContainer
|
||||
{
|
||||
protected override bool StartHidden => true;
|
||||
|
||||
public StatisticsPanel(ScoreInfo score)
|
||||
{
|
||||
// Todo: Not correct.
|
||||
@ -19,27 +19,19 @@ namespace osu.Game.Screens.Ranking.Statistics
|
||||
|
||||
FillFlowContainer statisticRows;
|
||||
|
||||
InternalChildren = new Drawable[]
|
||||
InternalChild = new Container
|
||||
{
|
||||
new Box
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Padding = new MarginPadding
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Colour = Color4Extensions.FromHex("#333")
|
||||
Left = ScorePanel.EXPANDED_WIDTH + 30 + 50,
|
||||
Right = 50
|
||||
},
|
||||
new Container
|
||||
Child = statisticRows = new FillFlowContainer
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Padding = new MarginPadding
|
||||
{
|
||||
Left = ScorePanel.EXPANDED_WIDTH + 30 + 50,
|
||||
Right = 50
|
||||
},
|
||||
Child = statisticRows = new FillFlowContainer
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Direction = FillDirection.Vertical,
|
||||
Spacing = new Vector2(30, 15),
|
||||
}
|
||||
Direction = FillDirection.Vertical,
|
||||
Spacing = new Vector2(30, 15),
|
||||
}
|
||||
};
|
||||
|
||||
@ -55,5 +47,9 @@ namespace osu.Game.Screens.Ranking.Statistics
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
protected override void PopIn() => this.FadeIn();
|
||||
|
||||
protected override void PopOut() => this.FadeOut();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user