mirror of
https://github.com/ppy/osu.git
synced 2024-12-16 01:33:21 +08:00
Merge pull request #10537 from LeNitrous/fix-jittery-scorecounter
Fix legacy score & combo counter text overflowing outside padding
This commit is contained in:
commit
1bc49103a3
@ -4,6 +4,7 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using NUnit.Framework;
|
||||
using osu.Framework.Extensions.IEnumerableExtensions;
|
||||
using osu.Framework.Testing;
|
||||
using osu.Game.Rulesets;
|
||||
using osu.Game.Rulesets.Osu;
|
||||
@ -43,5 +44,11 @@ namespace osu.Game.Tests.Visual.Gameplay
|
||||
s.Current.Value += 300;
|
||||
});
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void TestVeryLargeScore()
|
||||
{
|
||||
AddStep("set large score", () => scoreCounters.ForEach(counter => counter.Current.Value = 1_000_000_000));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -29,7 +29,9 @@ namespace osu.Game.Skinning
|
||||
[Resolved(canBeNull: true)]
|
||||
private HUDOverlay hud { get; set; }
|
||||
|
||||
protected sealed override OsuSpriteText CreateSpriteText() => (OsuSpriteText)skin?.GetDrawableComponent(new HUDSkinComponent(HUDSkinComponents.ScoreText));
|
||||
protected sealed override OsuSpriteText CreateSpriteText()
|
||||
=> (OsuSpriteText)skin?.GetDrawableComponent(new HUDSkinComponent(HUDSkinComponents.ScoreText))
|
||||
?.With(s => s.Anchor = s.Origin = Anchor.TopRight);
|
||||
|
||||
protected override void Update()
|
||||
{
|
||||
|
@ -33,6 +33,8 @@ namespace osu.Game.Skinning
|
||||
Margin = new MarginPadding(10);
|
||||
}
|
||||
|
||||
protected sealed override OsuSpriteText CreateSpriteText() => (OsuSpriteText)skin.GetDrawableComponent(new HUDSkinComponent(HUDSkinComponents.ScoreText));
|
||||
protected sealed override OsuSpriteText CreateSpriteText()
|
||||
=> (OsuSpriteText)skin.GetDrawableComponent(new HUDSkinComponent(HUDSkinComponents.ScoreText))
|
||||
.With(s => s.Anchor = s.Origin = Anchor.TopRight);
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user