mirror of
https://github.com/ppy/osu
synced 2025-01-09 15:49:32 +00:00
Rename HoldToQuit to QuitButton
This commit is contained in:
parent
f8630115d6
commit
39db1e8cbb
@ -16,8 +16,8 @@ namespace osu.Game.Tests.Visual
|
||||
|
||||
public TestCaseHoldToQuit()
|
||||
{
|
||||
HoldToQuit holdToQuit;
|
||||
Add(holdToQuit = new HoldToQuit
|
||||
QuitButton holdToQuit;
|
||||
Add(holdToQuit = new QuitButton
|
||||
{
|
||||
Origin = Anchor.BottomRight,
|
||||
Anchor = Anchor.BottomRight,
|
||||
|
@ -14,16 +14,16 @@ using OpenTK;
|
||||
|
||||
namespace osu.Game.Screens.Play.HUD
|
||||
{
|
||||
public class HoldToQuit : FillFlowContainer
|
||||
public class QuitButton : FillFlowContainer
|
||||
{
|
||||
private readonly HoldToQuitButton button;
|
||||
private readonly Button button;
|
||||
public Action ExitAction
|
||||
{
|
||||
get => button.ExitAction;
|
||||
set => button.ExitAction = value;
|
||||
}
|
||||
|
||||
public HoldToQuit()
|
||||
public QuitButton()
|
||||
{
|
||||
OsuSpriteText text;
|
||||
Direction = FillDirection.Horizontal;
|
||||
@ -37,12 +37,12 @@ namespace osu.Game.Screens.Play.HUD
|
||||
Anchor = Anchor.CentreLeft,
|
||||
Origin = Anchor.CentreLeft
|
||||
},
|
||||
button = new HoldToQuitButton(text)
|
||||
button = new Button(text)
|
||||
};
|
||||
AutoSizeAxes = Axes.Both;
|
||||
}
|
||||
|
||||
public class HoldToQuitButton : CircularContainer
|
||||
private class Button : CircularContainer
|
||||
{
|
||||
private readonly OsuSpriteText text;
|
||||
private SpriteIcon icon;
|
||||
@ -54,7 +54,7 @@ namespace osu.Game.Screens.Play.HUD
|
||||
private const int progress_duration = 1000;
|
||||
private const int text_display_time = 5000;
|
||||
|
||||
public HoldToQuitButton(OsuSpriteText text) => this.text = text;
|
||||
public Button(OsuSpriteText text) => this.text = text;
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuColour colours)
|
@ -34,7 +34,7 @@ namespace osu.Game.Screens.Play
|
||||
public readonly HealthDisplay HealthDisplay;
|
||||
public readonly SongProgress Progress;
|
||||
public readonly ModDisplay ModDisplay;
|
||||
public readonly HoldToQuit HoldToQuit;
|
||||
public readonly QuitButton HoldToQuit;
|
||||
public readonly PlayerSettingsOverlay PlayerSettingsOverlay;
|
||||
|
||||
private Bindable<bool> showHud;
|
||||
@ -58,7 +58,7 @@ namespace osu.Game.Screens.Play
|
||||
AccuracyCounter = CreateAccuracyCounter(),
|
||||
HealthDisplay = CreateHealthDisplay(),
|
||||
Progress = CreateProgress(),
|
||||
HoldToQuit = CreateHoldToQuit(),
|
||||
HoldToQuit = CreateQuitButton(),
|
||||
ModDisplay = CreateModsContainer(),
|
||||
PlayerSettingsOverlay = CreatePlayerSettingsOverlay()
|
||||
}
|
||||
@ -207,11 +207,11 @@ namespace osu.Game.Screens.Play
|
||||
RelativeSizeAxes = Axes.X,
|
||||
};
|
||||
|
||||
protected virtual HoldToQuit CreateHoldToQuit() => new HoldToQuit
|
||||
protected virtual QuitButton CreateQuitButton() => new QuitButton
|
||||
{
|
||||
Anchor = Anchor.BottomRight,
|
||||
Origin = Anchor.BottomRight,
|
||||
Margin = new MarginPadding { Bottom = Progress.Size.Y * 1.25f, Right = 5 }
|
||||
Position = new Vector2(-5, -70)
|
||||
};
|
||||
|
||||
protected virtual ModDisplay CreateModsContainer() => new ModDisplay
|
||||
|
Loading…
Reference in New Issue
Block a user