mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 09:32:55 +08:00
Adjust naming inside the LoadingButton
This commit is contained in:
parent
a6d5a2024a
commit
b310fd9d44
@ -27,13 +27,13 @@ namespace osu.Game.Graphics.UserInterface
|
||||
if (value)
|
||||
{
|
||||
loading.Show();
|
||||
content.FadeOut(fade_duration, Easing.OutQuint);
|
||||
text.FadeOut(fade_duration, Easing.OutQuint);
|
||||
OnLoadingStart();
|
||||
}
|
||||
else
|
||||
{
|
||||
loading.Hide();
|
||||
content.FadeIn(fade_duration, Easing.OutQuint);
|
||||
text.FadeIn(fade_duration, Easing.OutQuint);
|
||||
OnLoadingFinished();
|
||||
}
|
||||
}
|
||||
@ -46,17 +46,17 @@ namespace osu.Game.Graphics.UserInterface
|
||||
}
|
||||
|
||||
private readonly LoadingAnimation loading;
|
||||
private readonly Drawable content;
|
||||
private readonly Drawable text;
|
||||
|
||||
protected LoadingButton()
|
||||
{
|
||||
Container background;
|
||||
Container content;
|
||||
|
||||
Child = background = CreateBackground();
|
||||
Child = content = CreateContent();
|
||||
|
||||
background.AddRange(new[]
|
||||
content.AddRange(new[]
|
||||
{
|
||||
content = CreateContent(),
|
||||
text = CreateText(),
|
||||
loading = new LoadingAnimation
|
||||
{
|
||||
Anchor = Anchor.Centre,
|
||||
@ -90,8 +90,8 @@ namespace osu.Game.Graphics.UserInterface
|
||||
{
|
||||
}
|
||||
|
||||
protected abstract Container CreateBackground();
|
||||
protected abstract Container CreateContent();
|
||||
|
||||
protected abstract Drawable CreateContent();
|
||||
protected abstract Drawable CreateText();
|
||||
}
|
||||
}
|
||||
|
@ -40,7 +40,7 @@ namespace osu.Game.Graphics.UserInterface
|
||||
AutoSizeAxes = Axes.Both;
|
||||
}
|
||||
|
||||
protected override Container CreateBackground() => new CircularContainer
|
||||
protected override Container CreateContent() => new CircularContainer
|
||||
{
|
||||
Masking = true,
|
||||
Size = new Vector2(140, 30),
|
||||
@ -50,7 +50,7 @@ namespace osu.Game.Graphics.UserInterface
|
||||
}
|
||||
};
|
||||
|
||||
protected override Drawable CreateContent() => new FillFlowContainer
|
||||
protected override Drawable CreateText() => new FillFlowContainer
|
||||
{
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
|
@ -84,7 +84,7 @@ namespace osu.Game.Overlays.Comments
|
||||
IsLoading = false;
|
||||
}
|
||||
|
||||
protected override Container CreateBackground() => new Container
|
||||
protected override Container CreateContent() => new Container
|
||||
{
|
||||
RelativeSizeAxes = Axes.Y,
|
||||
AutoSizeAxes = Axes.X,
|
||||
@ -119,7 +119,7 @@ namespace osu.Game.Overlays.Comments
|
||||
},
|
||||
};
|
||||
|
||||
protected override Drawable CreateContent() => votesCounter = new OsuSpriteText
|
||||
protected override Drawable CreateText() => votesCounter = new OsuSpriteText
|
||||
{
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
|
Loading…
Reference in New Issue
Block a user