Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion osu.Game/Screens/Ranking/ResultsScreen.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ namespace osu.Game.Screens.Ranking
[Cached]
public abstract partial class ResultsScreen : ScreenWithBeatmapBackground, IKeyBindingHandler<GlobalAction>
{
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;
Expand Down
6 changes: 3 additions & 3 deletions osu.Game/Screens/Ranking/ScorePanel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public partial class ScorePanel : CompositeDrawable, IStateful<PanelState>
/// <summary>
/// Height of the top layer when the panel is expanded.
/// </summary>
private const float expanded_top_layer_height = 53;
public const float EXPANDED_TOP_LAYER_HEIGHT = 53;

/// <summary>
/// Height of the top layer when the panel is contracted.
Expand Down Expand Up @@ -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:
Expand Down
127 changes: 66 additions & 61 deletions osu.Game/Screens/Ranking/Statistics/PerformanceBreakdownChart.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@
[Resolved]
private BeatmapDifficultyCache difficultyCache { get; set; } = null!;

private const int achieved_pp_font_size = 18;
private const int horizontal_padding = 25;

public PerformanceBreakdownChart(ScoreInfo score, IBeatmap playableBeatmap)
{
this.score = score;
Expand All @@ -54,86 +57,88 @@
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[]
Padding = new MarginPadding
{
Horizontal = horizontal_padding,
},
RowDimensions = new[] { new Dimension(GridSizeMode.AutoSize) },
ColumnDimensions = new[]
{
new Dimension(GridSizeMode.AutoSize),
new Dimension()
},
Content = new[]
{
new GridContainer
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[]
new FillFlowContainer
{
new Dimension(GridSizeMode.AutoSize),
new Dimension(GridSizeMode.AutoSize)
},
Content = new[]
{
new Drawable[]
Origin = Anchor.Centre,
Anchor = Anchor.Centre,
AutoSizeAxes = Axes.Both,
Direction = FillDirection.Vertical,
Margin = new MarginPadding
{
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")
}
Right = horizontal_padding * 2,
},
new Drawable[]
Children = new Drawable[]
{
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)
Origin = Anchor.Centre,
Anchor = Anchor.Centre,
Font = OsuFont.GetFont(weight: FontWeight.SemiBold, size: achieved_pp_font_size),
Text = "Achieved PP",
},
maximumPerformance = new OsuSpriteText
new FillFlowContainer()
{
Origin = Anchor.CentreLeft,
Anchor = Anchor.CentreLeft,
Font = OsuFont.GetFont(weight: FontWeight.Regular, size: StatisticItem.FONT_SIZE),
Colour = OsuColour.Gray(0.7f)
Origin = Anchor.Centre,
Anchor = Anchor.Centre,
Direction = FillDirection.Horizontal,
Spacing = new Vector2(5),
AutoSizeAxes = Axes.Both,
Children = new[]
{
achievedPerformance = new OsuSpriteText
{
Font = OsuFont.GetFont(weight: FontWeight.Bold, size: achieved_pp_font_size),
Colour = Color4Extensions.FromHex("#66FFCC")
},
new OsuSpriteText
{
Font = OsuFont.GetFont(weight: FontWeight.Regular, size: achieved_pp_font_size),
Text = "/",
Colour = OsuColour.Gray(0.7f)
},
maximumPerformance = new OsuSpriteText
{
Font = OsuFont.GetFont(weight: FontWeight.Regular, size: achieved_pp_font_size),
Colour = OsuColour.Gray(0.7f)
},
}
}
}
}
},
chart = new GridContainer
{
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,
Origin = Anchor.TopCentre,
Anchor = Anchor.TopCentre,
ColumnDimensions = new[]
},
chart = new GridContainer
{
new Dimension(GridSizeMode.AutoSize),
new Dimension(),
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)
}
},
}
}
}
Expand Down
10 changes: 5 additions & 5 deletions osu.Game/Screens/Ranking/Statistics/StatisticItemContainer.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
// 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.Colour;
using osu.Framework.Graphics.Containers;
Expand Down Expand Up @@ -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
Expand All @@ -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()
}
}
Expand Down
35 changes: 18 additions & 17 deletions osu.Game/Screens/Ranking/Statistics/StatisticItemHeader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down Expand Up @@ -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")
}
}
};
Expand Down
8 changes: 4 additions & 4 deletions osu.Game/Screens/Ranking/Statistics/StatisticsPanel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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[]
{
Expand Down Expand Up @@ -156,7 +156,7 @@ private void populateStatistics(ValueChangedEvent<ScoreInfo?> score)
{
RelativeSizeAxes = Axes.X,
AutoSizeAxes = Axes.Y,
Spacing = new Vector2(30, 15),
Spacing = new Vector2(30, 10),
Direction = FillDirection.Full,
}
}
Expand Down
Loading