mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 15:33:05 +08:00
Merge pull request #3403 from smoogipoo/results-auto-scaling
Scale the results screen score to keep it in view
This commit is contained in:
commit
591ce67e24
@ -29,6 +29,7 @@ namespace osu.Game.Screens.Ranking
|
|||||||
{
|
{
|
||||||
public class ResultsPageScore : ResultsPage
|
public class ResultsPageScore : ResultsPage
|
||||||
{
|
{
|
||||||
|
private Container scoreContainer;
|
||||||
private ScoreCounter scoreCounter;
|
private ScoreCounter scoreCounter;
|
||||||
|
|
||||||
public ResultsPageScore(Score score, WorkingBeatmap beatmap) : base(score, beatmap) { }
|
public ResultsPageScore(Score score, WorkingBeatmap beatmap) : base(score, beatmap) { }
|
||||||
@ -76,7 +77,7 @@ namespace osu.Game.Screens.Ranking
|
|||||||
Size = new Vector2(150, 60),
|
Size = new Vector2(150, 60),
|
||||||
Margin = new MarginPadding(20),
|
Margin = new MarginPadding(20),
|
||||||
},
|
},
|
||||||
new Container
|
scoreContainer = new Container
|
||||||
{
|
{
|
||||||
Anchor = Anchor.TopCentre,
|
Anchor = Anchor.TopCentre,
|
||||||
Origin = Anchor.TopCentre,
|
Origin = Anchor.TopCentre,
|
||||||
@ -92,8 +93,8 @@ namespace osu.Game.Screens.Ranking
|
|||||||
},
|
},
|
||||||
scoreCounter = new SlowScoreCounter(6)
|
scoreCounter = new SlowScoreCounter(6)
|
||||||
{
|
{
|
||||||
Anchor = Anchor.TopCentre,
|
Anchor = Anchor.Centre,
|
||||||
Origin = Anchor.TopCentre,
|
Origin = Anchor.Centre,
|
||||||
Colour = colours.PinkDarker,
|
Colour = colours.PinkDarker,
|
||||||
Y = 10,
|
Y = 10,
|
||||||
TextSize = 56,
|
TextSize = 56,
|
||||||
@ -185,6 +186,13 @@ namespace osu.Game.Screens.Ranking
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected override void UpdateAfterChildren()
|
||||||
|
{
|
||||||
|
base.UpdateAfterChildren();
|
||||||
|
|
||||||
|
scoreCounter.Scale = new Vector2(Math.Min(1f, (scoreContainer.DrawWidth - 20) / scoreCounter.DrawWidth));
|
||||||
|
}
|
||||||
|
|
||||||
private class DrawableScoreStatistic : Container
|
private class DrawableScoreStatistic : Container
|
||||||
{
|
{
|
||||||
private readonly KeyValuePair<HitResult, object> statistic;
|
private readonly KeyValuePair<HitResult, object> statistic;
|
||||||
|
Loading…
Reference in New Issue
Block a user