mirror of
https://github.com/ppy/osu.git
synced 2025-02-16 17:03:18 +08:00
Move back button enable handling to shared method
This commit is contained in:
parent
9797e2d887
commit
66373bf038
@ -346,8 +346,6 @@ namespace osu.Game.Overlays
|
|||||||
stack.CurrentScreen.Exit();
|
stack.CurrentScreen.Exit();
|
||||||
currentStepIndex--;
|
currentStepIndex--;
|
||||||
|
|
||||||
BackButton.Enabled.Value = currentStepIndex != 0;
|
|
||||||
|
|
||||||
updateButtonText();
|
updateButtonText();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -358,8 +356,6 @@ namespace osu.Game.Overlays
|
|||||||
|
|
||||||
currentStepIndex++;
|
currentStepIndex++;
|
||||||
|
|
||||||
BackButton.Enabled.Value = currentStepIndex > 0;
|
|
||||||
|
|
||||||
if (currentStepIndex < steps.Length)
|
if (currentStepIndex < steps.Length)
|
||||||
{
|
{
|
||||||
stack.Push((Screen)Activator.CreateInstance(steps[currentStepIndex.Value].ScreenType));
|
stack.Push((Screen)Activator.CreateInstance(steps[currentStepIndex.Value].ScreenType));
|
||||||
@ -377,6 +373,8 @@ namespace osu.Game.Overlays
|
|||||||
{
|
{
|
||||||
Debug.Assert(currentStepIndex != null);
|
Debug.Assert(currentStepIndex != null);
|
||||||
|
|
||||||
|
BackButton.Enabled.Value = currentStepIndex != 0;
|
||||||
|
|
||||||
NextButton.Text = currentStepIndex + 1 < steps.Length
|
NextButton.Text = currentStepIndex + 1 < steps.Length
|
||||||
? FirstRunSetupOverlayStrings.Next(steps[currentStepIndex.Value + 1].Description)
|
? FirstRunSetupOverlayStrings.Next(steps[currentStepIndex.Value + 1].Description)
|
||||||
: CommonStrings.Finish;
|
: CommonStrings.Finish;
|
||||||
|
Loading…
Reference in New Issue
Block a user