mirror of
https://github.com/osukey/osukey.git
synced 2025-07-29 14:15:27 +09:00
Ensure button text is updated on going backwards
This commit is contained in:
@ -246,6 +246,8 @@ namespace osu.Game.Overlays
|
|||||||
currentStepIndex--;
|
currentStepIndex--;
|
||||||
|
|
||||||
BackButton.Enabled.Value = currentStepIndex != 0;
|
BackButton.Enabled.Value = currentStepIndex != 0;
|
||||||
|
|
||||||
|
updateButtonText();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void showNextStep()
|
private void showNextStep()
|
||||||
@ -260,12 +262,8 @@ namespace osu.Game.Overlays
|
|||||||
|
|
||||||
if (currentStepIndex < steps.Length)
|
if (currentStepIndex < steps.Length)
|
||||||
{
|
{
|
||||||
var nextStep = steps[currentStepIndex.Value];
|
stack.Push((Screen)Activator.CreateInstance(steps[currentStepIndex.Value].ScreenType));
|
||||||
stack.Push((Screen)Activator.CreateInstance(nextStep.ScreenType));
|
updateButtonText();
|
||||||
|
|
||||||
NextButton.Text = currentStepIndex + 1 < steps.Length
|
|
||||||
? $"Next ({steps[currentStepIndex.Value + 1].Description})"
|
|
||||||
: "Finish";
|
|
||||||
}
|
}
|
||||||
else
|
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()
|
protected override void PopOut()
|
||||||
{
|
{
|
||||||
base.PopOut();
|
base.PopOut();
|
||||||
|
Reference in New Issue
Block a user