1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 12:57:36 +08:00

Move back button enable handling to shared method

This commit is contained in:
Dean Herbert 2022-04-20 14:50:41 +09:00
parent 9797e2d887
commit 66373bf038

View File

@ -346,8 +346,6 @@ namespace osu.Game.Overlays
stack.CurrentScreen.Exit();
currentStepIndex--;
BackButton.Enabled.Value = currentStepIndex != 0;
updateButtonText();
}
@ -358,8 +356,6 @@ namespace osu.Game.Overlays
currentStepIndex++;
BackButton.Enabled.Value = currentStepIndex > 0;
if (currentStepIndex < steps.Length)
{
stack.Push((Screen)Activator.CreateInstance(steps[currentStepIndex.Value].ScreenType));
@ -377,6 +373,8 @@ namespace osu.Game.Overlays
{
Debug.Assert(currentStepIndex != null);
BackButton.Enabled.Value = currentStepIndex != 0;
NextButton.Text = currentStepIndex + 1 < steps.Length
? FirstRunSetupOverlayStrings.Next(steps[currentStepIndex.Value + 1].Description)
: CommonStrings.Finish;