Move skin background to separate file

This commit is contained in:
Bartłomiej Dach
2021-06-08 21:57:08 +02:00
parent 04cc788627
commit 5bf4dd6358
2 changed files with 25 additions and 17 deletions

View File

@ -140,22 +140,5 @@ namespace osu.Game.Screens.Backgrounds
return $@"Menu/menu-background-{currentDisplay % background_count + 1}";
}
}
private class SkinnedBackground : Background
{
private readonly Skin skin;
public SkinnedBackground(Skin skin, string fallbackTextureName)
: base(fallbackTextureName)
{
this.skin = skin;
}
[BackgroundDependencyLoader]
private void load()
{
Sprite.Texture = skin.GetTexture("menu-background") ?? Sprite.Texture;
}
}
}
}