mirror of
https://github.com/ppy/osu
synced 2025-01-10 08:09:40 +00:00
Disable forward button when already at end
This commit is contained in:
parent
7e7fa633f0
commit
8c2d70e93f
@ -346,7 +346,7 @@ namespace osu.Game.Overlays
|
|||||||
stack.CurrentScreen.Exit();
|
stack.CurrentScreen.Exit();
|
||||||
currentStepIndex--;
|
currentStepIndex--;
|
||||||
|
|
||||||
updateButtonText();
|
updateButtons();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void showNextStep()
|
private void showNextStep()
|
||||||
@ -359,7 +359,6 @@ namespace osu.Game.Overlays
|
|||||||
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));
|
||||||
updateButtonText();
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -367,17 +366,21 @@ namespace osu.Game.Overlays
|
|||||||
currentStepIndex = null;
|
currentStepIndex = null;
|
||||||
Hide();
|
Hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
updateButtons();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateButtonText()
|
private void updateButtons()
|
||||||
{
|
{
|
||||||
Debug.Assert(currentStepIndex != null);
|
BackButton.Enabled.Value = currentStepIndex > 0;
|
||||||
|
NextButton.Enabled.Value = currentStepIndex != null;
|
||||||
|
|
||||||
BackButton.Enabled.Value = currentStepIndex != 0;
|
if (currentStepIndex != null)
|
||||||
|
{
|
||||||
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private class FirstRunStep
|
private class FirstRunStep
|
||||||
|
Loading…
Reference in New Issue
Block a user