mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 06:52:56 +08:00
Fix results star rating display not being centered when no mods are present
Needed or the spacing will apply to the fill flow container, causing alignment issues.
This commit is contained in:
parent
493b654011
commit
88cc552534
@ -30,6 +30,9 @@ namespace osu.Game.Screens.Ranking.Expanded
|
||||
private readonly ScoreInfo score;
|
||||
|
||||
private readonly List<StatisticDisplay> statisticDisplays = new List<StatisticDisplay>();
|
||||
|
||||
private FillFlowContainer starAndModDisplay;
|
||||
|
||||
private RollingCounter<long> scoreCounter;
|
||||
|
||||
/// <summary>
|
||||
@ -119,7 +122,7 @@ namespace osu.Game.Screens.Ranking.Expanded
|
||||
Alpha = 0,
|
||||
AlwaysPresent = true
|
||||
},
|
||||
new FillFlowContainer
|
||||
starAndModDisplay = new FillFlowContainer
|
||||
{
|
||||
Anchor = Anchor.TopCentre,
|
||||
Origin = Anchor.TopCentre,
|
||||
@ -132,15 +135,6 @@ namespace osu.Game.Screens.Ranking.Expanded
|
||||
Anchor = Anchor.CentreLeft,
|
||||
Origin = Anchor.CentreLeft
|
||||
},
|
||||
new ModDisplay
|
||||
{
|
||||
Anchor = Anchor.CentreLeft,
|
||||
Origin = Anchor.CentreLeft,
|
||||
DisplayUnrankedText = false,
|
||||
ExpansionMode = ExpansionMode.AlwaysExpanded,
|
||||
Scale = new Vector2(0.5f),
|
||||
Current = { Value = score.Mods }
|
||||
}
|
||||
}
|
||||
},
|
||||
new FillFlowContainer
|
||||
@ -215,6 +209,19 @@ namespace osu.Game.Screens.Ranking.Expanded
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
if (score.Mods.Any())
|
||||
{
|
||||
starAndModDisplay.Add(new ModDisplay
|
||||
{
|
||||
Anchor = Anchor.CentreLeft,
|
||||
Origin = Anchor.CentreLeft,
|
||||
DisplayUnrankedText = false,
|
||||
ExpansionMode = ExpansionMode.AlwaysExpanded,
|
||||
Scale = new Vector2(0.5f),
|
||||
Current = { Value = score.Mods }
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
protected override void LoadComplete()
|
||||
|
Loading…
Reference in New Issue
Block a user