1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-12 17:35:10 +08:00

Switch to direct casts (we can be sure LegacySpriteText is present at this point)

This commit is contained in:
Dean Herbert 2020-10-16 17:38:21 +09:00
parent 3ce6d1fea1
commit 24b0a1b84b
2 changed files with 2 additions and 2 deletions

View File

@ -29,7 +29,7 @@ namespace osu.Game.Skinning
[Resolved(canBeNull: true)]
private HUDOverlay hud { get; set; }
protected sealed override OsuSpriteText CreateSpriteText() => skin?.GetDrawableComponent(new HUDSkinComponent(HUDSkinComponents.ScoreText)) as OsuSpriteText ?? new OsuSpriteText();
protected sealed override OsuSpriteText CreateSpriteText() => (OsuSpriteText)skin?.GetDrawableComponent(new HUDSkinComponent(HUDSkinComponents.ScoreText));
protected override void Update()
{

View File

@ -31,6 +31,6 @@ namespace osu.Game.Skinning
Margin = new MarginPadding(10);
}
protected sealed override OsuSpriteText CreateSpriteText() => skin?.GetDrawableComponent(new HUDSkinComponent(HUDSkinComponents.ScoreText)) as OsuSpriteText ?? new OsuSpriteText();
protected sealed override OsuSpriteText CreateSpriteText() => (OsuSpriteText)skin.GetDrawableComponent(new HUDSkinComponent(HUDSkinComponents.ScoreText));
}
}