mirror of
https://github.com/ppy/osu.git
synced 2025-01-14 04:02:59 +08:00
Ensure wizard returns to initial screen after completion
This commit is contained in:
parent
6716621444
commit
fb7dc89503
@ -60,6 +60,10 @@ namespace osu.Game.Tests.Visual.UserInterface
|
|||||||
|
|
||||||
return overlay.State.Value == Visibility.Hidden;
|
return overlay.State.Value == Visibility.Hidden;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
AddStep("display again on demand", () => overlay.Show());
|
||||||
|
|
||||||
|
AddUntilStep("back at start", () => overlay.CurrentScreen is ScreenWelcome);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
|
@ -262,15 +262,16 @@ namespace osu.Game.Overlays
|
|||||||
{
|
{
|
||||||
var nextStep = steps[currentStepIndex.Value];
|
var nextStep = steps[currentStepIndex.Value];
|
||||||
stack.Push((Screen)Activator.CreateInstance(nextStep.ScreenType));
|
stack.Push((Screen)Activator.CreateInstance(nextStep.ScreenType));
|
||||||
|
|
||||||
|
NextButton.Text = currentStepIndex + 1 < steps.Length
|
||||||
|
? $"Next ({steps[currentStepIndex.Value + 1].Description})"
|
||||||
|
: "Finish";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Hide();
|
Hide();
|
||||||
|
currentStepIndex = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
NextButton.Text = currentStepIndex + 1 < steps.Length
|
|
||||||
? $"Next ({steps[currentStepIndex.Value + 1].Description})"
|
|
||||||
: "Finish";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void PopOut()
|
protected override void PopOut()
|
||||||
|
Loading…
Reference in New Issue
Block a user