mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 15:22:55 +08:00
Add skinning support for welcome sprite text
This commit is contained in:
parent
df500dec04
commit
b38de6e580
@ -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()
|
||||||
|
Loading…
Reference in New Issue
Block a user