1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-12 18:23:04 +08:00

Add skinning support for welcome sprite text

This commit is contained in:
Salman Ahmed 2022-03-10 05:51:54 +03:00
parent df500dec04
commit b38de6e580

View File

@ -100,13 +100,13 @@ namespace osu.Game.Screens.Menu
private class WelcomeIntroSequence : Container private class WelcomeIntroSequence : Container
{ {
private Sprite welcomeText; private Drawable welcomeText;
private Container scaleContainer; private Container scaleContainer;
public LogoVisualisation LogoVisualisation { get; private set; } public LogoVisualisation LogoVisualisation { get; private set; }
[BackgroundDependencyLoader] [BackgroundDependencyLoader]
private void load(TextureStore textures) private void load(TextureStore textures, IAPIProvider api)
{ {
Origin = Anchor.Centre; Origin = Anchor.Centre;
Anchor = Anchor.Centre; Anchor = Anchor.Centre;
@ -135,15 +135,17 @@ namespace osu.Game.Screens.Menu
Size = new Vector2(480), Size = new Vector2(480),
Colour = Color4.Black Colour = Color4.Black
}, },
welcomeText = new Sprite
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
Texture = textures.Get(@"Intro/Welcome/welcome_text")
},
} }
}, },
}; };
if (api.LocalUser.Value.IsSupporter)
scaleContainer.Add(welcomeText = new SkinnableSprite(@"Intro/Welcome/welcome_text"));
else
scaleContainer.Add(welcomeText = new Sprite { Texture = textures.Get(@"Intro/Welcome/welcome_text") });
welcomeText.Anchor = Anchor.Centre;
welcomeText.Origin = Anchor.Centre;
} }
protected override void LoadComplete() protected override void LoadComplete()