mirror of
https://github.com/ppy/osu.git
synced 2025-01-27 18:32:56 +08:00
Move legacy conversion to LegacySkin
This commit is contained in:
parent
1447ca55a3
commit
c70be29eda
@ -40,24 +40,7 @@ namespace osu.Game.Rulesets.Judgements
|
|||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OsuColour colours)
|
private void load(OsuColour colours)
|
||||||
{
|
{
|
||||||
string legacyName = string.Empty;
|
Child = new SkinnableDrawable($"Play/{Judgement.Result}", _ => JudgementText = new OsuSpriteText
|
||||||
switch (Judgement.Result)
|
|
||||||
{
|
|
||||||
case HitResult.Miss:
|
|
||||||
legacyName = "hit0";
|
|
||||||
break;
|
|
||||||
case HitResult.Meh:
|
|
||||||
legacyName = "hit50";
|
|
||||||
break;
|
|
||||||
case HitResult.Good:
|
|
||||||
legacyName = "hit100";
|
|
||||||
break;
|
|
||||||
case HitResult.Great:
|
|
||||||
legacyName = "hit300";
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
Child = new SkinnableDrawable($"Play/osu/{legacyName}", _ => JudgementText = new OsuSpriteText
|
|
||||||
{
|
{
|
||||||
Text = Judgement.Result.GetDescription().ToUpper(),
|
Text = Judgement.Result.GetDescription().ToUpper(),
|
||||||
Font = @"Venera",
|
Font = @"Venera",
|
||||||
|
@ -29,6 +29,22 @@ namespace osu.Game.Skinning
|
|||||||
|
|
||||||
public override Drawable GetDrawableComponent(string componentName)
|
public override Drawable GetDrawableComponent(string componentName)
|
||||||
{
|
{
|
||||||
|
switch (componentName)
|
||||||
|
{
|
||||||
|
case "Play/Miss":
|
||||||
|
componentName = "hit0";
|
||||||
|
break;
|
||||||
|
case "Play/Meh":
|
||||||
|
componentName = "hit50";
|
||||||
|
break;
|
||||||
|
case "Play/Good":
|
||||||
|
componentName = "hit100";
|
||||||
|
break;
|
||||||
|
case "Play/Great":
|
||||||
|
componentName = "hit300";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
var texture = textures.Get(componentName);
|
var texture = textures.Get(componentName);
|
||||||
if (texture == null) return null;
|
if (texture == null) return null;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user