mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 20:22:55 +08:00
Ensure button text is updated on going backwards
This commit is contained in:
parent
fb7dc89503
commit
3ea4eabdb6
@ -246,6 +246,8 @@ namespace osu.Game.Overlays
|
||||
currentStepIndex--;
|
||||
|
||||
BackButton.Enabled.Value = currentStepIndex != 0;
|
||||
|
||||
updateButtonText();
|
||||
}
|
||||
|
||||
private void showNextStep()
|
||||
@ -260,12 +262,8 @@ namespace osu.Game.Overlays
|
||||
|
||||
if (currentStepIndex < steps.Length)
|
||||
{
|
||||
var nextStep = steps[currentStepIndex.Value];
|
||||
stack.Push((Screen)Activator.CreateInstance(nextStep.ScreenType));
|
||||
|
||||
NextButton.Text = currentStepIndex + 1 < steps.Length
|
||||
? $"Next ({steps[currentStepIndex.Value + 1].Description})"
|
||||
: "Finish";
|
||||
stack.Push((Screen)Activator.CreateInstance(steps[currentStepIndex.Value].ScreenType));
|
||||
updateButtonText();
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -274,6 +272,15 @@ namespace osu.Game.Overlays
|
||||
}
|
||||
}
|
||||
|
||||
private void updateButtonText()
|
||||
{
|
||||
Debug.Assert(currentStepIndex != null);
|
||||
|
||||
NextButton.Text = currentStepIndex + 1 < steps.Length
|
||||
? $"Next ({steps[currentStepIndex.Value + 1].Description})"
|
||||
: "Finish";
|
||||
}
|
||||
|
||||
protected override void PopOut()
|
||||
{
|
||||
base.PopOut();
|
||||
|
Loading…
Reference in New Issue
Block a user