diff --git a/osu.Game/Screens/Ranking/ResultsScreen.cs b/osu.Game/Screens/Ranking/ResultsScreen.cs index 99f7f661cbe3..dbf6802f90e4 100644 --- a/osu.Game/Screens/Ranking/ResultsScreen.cs +++ b/osu.Game/Screens/Ranking/ResultsScreen.cs @@ -39,7 +39,7 @@ namespace osu.Game.Screens.Ranking [Cached] public abstract partial class ResultsScreen : ScreenWithBeatmapBackground, IKeyBindingHandler { - protected const float BACKGROUND_BLUR = 20; + protected const float BACKGROUND_BLUR = 10; private static readonly float screen_height = 768 - TwoLayerButton.SIZE_EXTENDED.Y; public override bool DisallowExternalBeatmapRulesetChanges => true; diff --git a/osu.Game/Screens/Ranking/ScorePanel.cs b/osu.Game/Screens/Ranking/ScorePanel.cs index 72927ee6ebc5..2107c2b0d522 100644 --- a/osu.Game/Screens/Ranking/ScorePanel.cs +++ b/osu.Game/Screens/Ranking/ScorePanel.cs @@ -48,7 +48,7 @@ public partial class ScorePanel : CompositeDrawable, IStateful /// /// Height of the top layer when the panel is expanded. /// - private const float expanded_top_layer_height = 53; + public const float EXPANDED_TOP_LAYER_HEIGHT = 53; /// /// Height of the top layer when the panel is contracted. @@ -286,8 +286,8 @@ private void updateState() switch (state) { case PanelState.Expanded: - topLayerContainer.MoveToY(-expanded_top_layer_height / 2, top_layer_expand_duration, Easing.OutQuint); - middleLayerContainer.MoveToY(expanded_top_layer_height / 2, top_layer_expand_duration, Easing.OutQuint); + topLayerContainer.MoveToY(-EXPANDED_TOP_LAYER_HEIGHT / 2, top_layer_expand_duration, Easing.OutQuint); + middleLayerContainer.MoveToY(EXPANDED_TOP_LAYER_HEIGHT / 2, top_layer_expand_duration, Easing.OutQuint); break; case PanelState.Contracted: diff --git a/osu.Game/Screens/Ranking/Statistics/PerformanceBreakdownChart.cs b/osu.Game/Screens/Ranking/Statistics/PerformanceBreakdownChart.cs index f9c8c93deca2..50313b2e5f80 100644 --- a/osu.Game/Screens/Ranking/Statistics/PerformanceBreakdownChart.cs +++ b/osu.Game/Screens/Ranking/Statistics/PerformanceBreakdownChart.cs @@ -19,7 +19,6 @@ using osu.Game.Graphics.UserInterface; using osu.Game.Rulesets.Difficulty; using osu.Game.Scoring; -using osuTK; using osuTK.Graphics; namespace osu.Game.Screens.Ranking.Statistics @@ -54,86 +53,94 @@ private void load() Origin = Anchor.Centre, Anchor = Anchor.Centre }, - content = new FillFlowContainer + content = new GridContainer { Alpha = 0, RelativeSizeAxes = Axes.X, AutoSizeAxes = Axes.Y, - Width = 0.6f, Origin = Anchor.TopCentre, Anchor = Anchor.TopCentre, - Spacing = new Vector2(15, 15), - Children = new Drawable[] + RowDimensions = new[] { new Dimension(GridSizeMode.AutoSize) }, + ColumnDimensions = new[] { - new GridContainer + new Dimension(), + new Dimension(GridSizeMode.Absolute, 50), + new Dimension() + }, + Content = new[] + { + new Drawable[] { - RelativeSizeAxes = Axes.X, - Width = 0.8f, - AutoSizeAxes = Axes.Y, - Origin = Anchor.TopCentre, - Anchor = Anchor.TopCentre, - ColumnDimensions = new[] - { - new Dimension(), - new Dimension(GridSizeMode.AutoSize) - }, - RowDimensions = new[] + chart = new GridContainer { - new Dimension(GridSizeMode.AutoSize), - new Dimension(GridSizeMode.AutoSize) + RelativeSizeAxes = Axes.X, + AutoSizeAxes = Axes.Y, + Origin = Anchor.Centre, + Anchor = Anchor.Centre, + ColumnDimensions = new[] + { + new Dimension(GridSizeMode.AutoSize), + new Dimension(), + new Dimension(GridSizeMode.AutoSize) + } }, - Content = new[] + new SimpleStatisticTable.Spacer(), + new GridContainer { - new Drawable[] + RelativeSizeAxes = Axes.X, + AutoSizeAxes = Axes.Y, + Origin = Anchor.Centre, + Anchor = Anchor.Centre, + ColumnDimensions = new[] { - new OsuSpriteText - { - Origin = Anchor.CentreLeft, - Anchor = Anchor.CentreLeft, - Font = OsuFont.GetFont(weight: FontWeight.Regular, size: StatisticItem.FONT_SIZE), - Text = "Achieved PP", - Colour = Color4Extensions.FromHex("#66FFCC") - }, - achievedPerformance = new OsuSpriteText - { - Origin = Anchor.CentreRight, - Anchor = Anchor.CentreRight, - Font = OsuFont.GetFont(weight: FontWeight.SemiBold, size: StatisticItem.FONT_SIZE), - Colour = Color4Extensions.FromHex("#66FFCC") - } + new Dimension(), + new Dimension(GridSizeMode.AutoSize) + }, + RowDimensions = new[] + { + new Dimension(GridSizeMode.AutoSize), + new Dimension(GridSizeMode.AutoSize) }, - new Drawable[] + Content = new[] { - new OsuSpriteText + new Drawable[] { - Origin = Anchor.CentreLeft, - Anchor = Anchor.CentreLeft, - Font = OsuFont.GetFont(weight: FontWeight.Regular, size: StatisticItem.FONT_SIZE), - Text = "Maximum", - Colour = OsuColour.Gray(0.7f) + new OsuSpriteText + { + Origin = Anchor.CentreLeft, + Anchor = Anchor.CentreLeft, + Font = OsuFont.GetFont(weight: FontWeight.Regular, size: StatisticItem.FONT_SIZE), + Text = "Achieved PP", + Colour = Color4Extensions.FromHex("#66FFCC") + }, + achievedPerformance = new OsuSpriteText + { + Origin = Anchor.CentreRight, + Anchor = Anchor.CentreRight, + Font = OsuFont.GetFont(weight: FontWeight.Regular, size: StatisticItem.FONT_SIZE), + Colour = Color4Extensions.FromHex("#66FFCC") + } }, - maximumPerformance = new OsuSpriteText + new Drawable[] { - Origin = Anchor.CentreLeft, - Anchor = Anchor.CentreLeft, - Font = OsuFont.GetFont(weight: FontWeight.Regular, size: StatisticItem.FONT_SIZE), - Colour = OsuColour.Gray(0.7f) + new OsuSpriteText + { + Origin = Anchor.CentreLeft, + Anchor = Anchor.CentreLeft, + Font = OsuFont.GetFont(weight: FontWeight.Regular, size: StatisticItem.FONT_SIZE), + Text = "Maximum", + Colour = OsuColour.Gray(0.7f) + }, + maximumPerformance = new OsuSpriteText + { + Origin = Anchor.CentreLeft, + Anchor = Anchor.CentreLeft, + Font = OsuFont.GetFont(weight: FontWeight.Regular, size: StatisticItem.FONT_SIZE), + Colour = OsuColour.Gray(0.7f) + } } } - } - }, - chart = new GridContainer - { - RelativeSizeAxes = Axes.X, - AutoSizeAxes = Axes.Y, - Origin = Anchor.TopCentre, - Anchor = Anchor.TopCentre, - ColumnDimensions = new[] - { - new Dimension(GridSizeMode.AutoSize), - new Dimension(), - new Dimension(GridSizeMode.AutoSize) - } + }, } } } diff --git a/osu.Game/Screens/Ranking/Statistics/StatisticItemContainer.cs b/osu.Game/Screens/Ranking/Statistics/StatisticItemContainer.cs index 8caf8d66b5f9..6020e9d10ffa 100644 --- a/osu.Game/Screens/Ranking/Statistics/StatisticItemContainer.cs +++ b/osu.Game/Screens/Ranking/Statistics/StatisticItemContainer.cs @@ -1,6 +1,7 @@ // Copyright (c) ppy Pty Ltd . 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.Colour; using osu.Framework.Graphics.Containers; @@ -31,16 +32,15 @@ public StatisticItemContainer(StatisticItem item) RelativeSizeAxes = Axes.X, AutoSizeAxes = Axes.Y, Masking = true, - CornerRadius = 6, + CornerRadius = 10, Children = new Drawable[] { new Box { Colour = ColourInfo.GradientVertical( - OsuColour.Gray(0.25f), - OsuColour.Gray(0.18f) + OsuColour.Gray(0.25f).Opacity(0.8f), + OsuColour.Gray(0.18f).Opacity(0.95f) ), - Alpha = 0.95f, RelativeSizeAxes = Axes.Both, }, new Container @@ -57,7 +57,7 @@ public StatisticItemContainer(StatisticItem item) { RelativeSizeAxes = Axes.X, AutoSizeAxes = Axes.Y, - Padding = new MarginPadding(10) { Top = 30 }, + Padding = new MarginPadding(20) { Top = 45 }, Child = item.CreateContent() } } diff --git a/osu.Game/Screens/Ranking/Statistics/StatisticItemHeader.cs b/osu.Game/Screens/Ranking/Statistics/StatisticItemHeader.cs index 6b496e10dd3d..6622bdec448c 100644 --- a/osu.Game/Screens/Ranking/Statistics/StatisticItemHeader.cs +++ b/osu.Game/Screens/Ranking/Statistics/StatisticItemHeader.cs @@ -10,7 +10,6 @@ using osu.Framework.Localisation; using osu.Game.Graphics; using osu.Game.Graphics.Sprites; -using osuTK; namespace osu.Game.Screens.Ranking.Statistics { @@ -38,28 +37,30 @@ private void load() RelativeSizeAxes = Axes.X; AutoSizeAxes = Axes.Y; - InternalChild = new FillFlowContainer + InternalChild = new Container { - RelativeSizeAxes = Axes.X, - Height = 20, - Direction = FillDirection.Horizontal, - Spacing = new Vector2(5, 0), + AutoSizeAxes = Axes.Both, + Margin = new MarginPadding + { + Horizontal = 10, + Top = 5, + Bottom = 20, + }, Children = new Drawable[] { - new Circle - { - Anchor = Anchor.CentreLeft, - Origin = Anchor.CentreLeft, - Height = 9, - Width = 4, - Colour = Color4Extensions.FromHex("#00FFAA") - }, spriteText = new OsuSpriteText { - Anchor = Anchor.CentreLeft, - Origin = Anchor.CentreLeft, Text = text, - Font = OsuFont.GetFont(size: StatisticItem.FONT_SIZE, weight: FontWeight.SemiBold), + Font = OsuFont.GetFont(size: 16, weight: FontWeight.Bold), + }, + new Box + { + Anchor = Anchor.BottomCentre, + Origin = Anchor.TopCentre, + Margin = new MarginPadding { Top = 4 }, + RelativeSizeAxes = Axes.X, + Height = 2, + Colour = Color4Extensions.FromHex("#66FFCC") } } }; diff --git a/osu.Game/Screens/Ranking/Statistics/StatisticsPanel.cs b/osu.Game/Screens/Ranking/Statistics/StatisticsPanel.cs index 55e029f0410f..e920821e0197 100644 --- a/osu.Game/Screens/Ranking/Statistics/StatisticsPanel.cs +++ b/osu.Game/Screens/Ranking/Statistics/StatisticsPanel.cs @@ -68,10 +68,10 @@ public StatisticsPanel() RelativeSizeAxes = Axes.Both, Padding = new MarginPadding { - Left = ScorePanel.EXPANDED_WIDTH + SIDE_PADDING * 3, + Left = ScorePanel.EXPANDED_WIDTH + SIDE_PADDING * 2, Right = SIDE_PADDING, - Top = SIDE_PADDING, - Bottom = 50 // Approximate padding to the bottom of the score panel. + Top = ScorePanel.EXPANDED_TOP_LAYER_HEIGHT, + Bottom = 15 // Approximate padding to the bottom of the score panel. }, Children = new Drawable[] { @@ -156,7 +156,7 @@ private void populateStatistics(ValueChangedEvent score) { RelativeSizeAxes = Axes.X, AutoSizeAxes = Axes.Y, - Spacing = new Vector2(30, 15), + Spacing = new Vector2(30, 10), Direction = FillDirection.Full, } }