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