mirror of
https://github.com/ppy/osu.git
synced 2024-12-15 02:42:54 +08:00
Merge branch 'master' into fix-unit-test-on-linux
This commit is contained in:
commit
c398ea764a
@ -1 +1 @@
|
|||||||
Subproject commit 768a775b688d7a008d8933275b48ed0d2d491f12
|
Subproject commit 6f7528255c5d6cde72f1e92de539983bc4bce502
|
@ -213,88 +213,89 @@ namespace osu.Game.Screens.Menu
|
|||||||
backButton.ContractStyle = 0;
|
backButton.ContractStyle = 0;
|
||||||
settingsButton.ContractStyle = 0;
|
settingsButton.ContractStyle = 0;
|
||||||
|
|
||||||
switch (state)
|
bool fromInitial = lastState == MenuState.Initial;
|
||||||
|
|
||||||
|
if (state == MenuState.TopLevel)
|
||||||
|
buttonArea.Flush(true);
|
||||||
|
|
||||||
|
using (buttonArea.BeginDelayedSequence(fromInitial ? 150 : 0, true))
|
||||||
{
|
{
|
||||||
case MenuState.Exit:
|
switch (state)
|
||||||
case MenuState.Initial:
|
{
|
||||||
toolbar?.Hide();
|
case MenuState.Exit:
|
||||||
|
case MenuState.Initial:
|
||||||
|
toolbar?.Hide();
|
||||||
|
|
||||||
buttonAreaBackground.ScaleTo(Vector2.One, 500, EasingTypes.Out);
|
buttonAreaBackground.ScaleTo(Vector2.One, 500, EasingTypes.Out);
|
||||||
buttonArea.FadeOut(300);
|
buttonArea.FadeOut(300);
|
||||||
|
|
||||||
osuLogo.Delay(150);
|
using (osuLogo.BeginDelayedSequence(150))
|
||||||
osuLogo.MoveTo(Vector2.Zero, 800, EasingTypes.OutExpo);
|
{
|
||||||
osuLogo.ScaleTo(1, 800, EasingTypes.OutExpo);
|
osuLogo.MoveTo(Vector2.Zero, 800, EasingTypes.OutExpo);
|
||||||
|
osuLogo.ScaleTo(1, 800, EasingTypes.OutExpo);
|
||||||
|
}
|
||||||
|
|
||||||
foreach (Button b in buttonsTopLevel)
|
foreach (Button b in buttonsTopLevel)
|
||||||
b.State = ButtonState.Contracted;
|
b.State = ButtonState.Contracted;
|
||||||
|
|
||||||
foreach (Button b in buttonsPlay)
|
foreach (Button b in buttonsPlay)
|
||||||
b.State = ButtonState.Contracted;
|
b.State = ButtonState.Contracted;
|
||||||
|
|
||||||
if (state == MenuState.Exit)
|
if (state == MenuState.Exit)
|
||||||
{
|
{
|
||||||
osuLogo.RotateTo(20, EXIT_DELAY * 1.5f);
|
osuLogo.RotateTo(20, EXIT_DELAY * 1.5f);
|
||||||
osuLogo.FadeOut(EXIT_DELAY);
|
osuLogo.FadeOut(EXIT_DELAY);
|
||||||
}
|
}
|
||||||
else if (lastState == MenuState.TopLevel)
|
else if (lastState == MenuState.TopLevel)
|
||||||
sampleBack?.Play();
|
sampleBack?.Play();
|
||||||
break;
|
break;
|
||||||
case MenuState.TopLevel:
|
case MenuState.TopLevel:
|
||||||
buttonArea.Flush(true);
|
buttonAreaBackground.ScaleTo(Vector2.One, 200, EasingTypes.Out);
|
||||||
|
|
||||||
buttonAreaBackground.ScaleTo(Vector2.One, 200, EasingTypes.Out);
|
osuLogo.ClearTransforms();
|
||||||
|
osuLogo.MoveTo(buttonFlow.DrawPosition, 200, EasingTypes.In);
|
||||||
|
osuLogo.ScaleTo(0.5f, 200, EasingTypes.In);
|
||||||
|
|
||||||
osuLogo.MoveTo(buttonFlow.DrawPosition, 200, EasingTypes.In);
|
buttonArea.FadeIn(300);
|
||||||
osuLogo.ScaleTo(0.5f, 200, EasingTypes.In);
|
|
||||||
|
|
||||||
buttonArea.FadeIn(300);
|
if (fromInitial && osuLogo.Scale.X > 0.5f)
|
||||||
|
|
||||||
if (lastState == MenuState.Initial)
|
|
||||||
{
|
|
||||||
buttonArea.Delay(150, true);
|
|
||||||
|
|
||||||
if (osuLogo.Scale.X > 0.5f)
|
|
||||||
using (osuLogo.BeginDelayedSequence(200, true))
|
using (osuLogo.BeginDelayedSequence(200, true))
|
||||||
osuLogo.Impact();
|
osuLogo.Impact();
|
||||||
}
|
|
||||||
|
|
||||||
Scheduler.AddDelayed(() => toolbar?.Show(), 150);
|
Scheduler.AddDelayed(() => toolbar?.Show(), 150);
|
||||||
|
|
||||||
foreach (Button b in buttonsTopLevel)
|
foreach (Button b in buttonsTopLevel)
|
||||||
b.State = ButtonState.Expanded;
|
b.State = ButtonState.Expanded;
|
||||||
|
|
||||||
foreach (Button b in buttonsPlay)
|
foreach (Button b in buttonsPlay)
|
||||||
b.State = ButtonState.Contracted;
|
b.State = ButtonState.Contracted;
|
||||||
break;
|
break;
|
||||||
case MenuState.Play:
|
case MenuState.Play:
|
||||||
foreach (Button b in buttonsTopLevel)
|
foreach (Button b in buttonsTopLevel)
|
||||||
b.State = ButtonState.Exploded;
|
b.State = ButtonState.Exploded;
|
||||||
|
|
||||||
foreach (Button b in buttonsPlay)
|
foreach (Button b in buttonsPlay)
|
||||||
b.State = ButtonState.Expanded;
|
b.State = ButtonState.Expanded;
|
||||||
break;
|
break;
|
||||||
case MenuState.EnteringMode:
|
case MenuState.EnteringMode:
|
||||||
buttonAreaBackground.ScaleTo(new Vector2(2, 0), 300, EasingTypes.InSine);
|
buttonAreaBackground.ScaleTo(new Vector2(2, 0), 300, EasingTypes.InSine);
|
||||||
|
|
||||||
buttonsTopLevel.ForEach(b => b.ContractStyle = 1);
|
buttonsTopLevel.ForEach(b => b.ContractStyle = 1);
|
||||||
buttonsPlay.ForEach(b => b.ContractStyle = 1);
|
buttonsPlay.ForEach(b => b.ContractStyle = 1);
|
||||||
backButton.ContractStyle = 1;
|
backButton.ContractStyle = 1;
|
||||||
settingsButton.ContractStyle = 1;
|
settingsButton.ContractStyle = 1;
|
||||||
|
|
||||||
foreach (Button b in buttonsTopLevel)
|
foreach (Button b in buttonsTopLevel)
|
||||||
b.State = ButtonState.Contracted;
|
b.State = ButtonState.Contracted;
|
||||||
|
|
||||||
foreach (Button b in buttonsPlay)
|
foreach (Button b in buttonsPlay)
|
||||||
b.State = ButtonState.Contracted;
|
b.State = ButtonState.Contracted;
|
||||||
break;
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
backButton.State = state == MenuState.Play ? ButtonState.Expanded : ButtonState.Contracted;
|
||||||
|
settingsButton.State = state == MenuState.TopLevel ? ButtonState.Expanded : ButtonState.Contracted;
|
||||||
}
|
}
|
||||||
|
|
||||||
backButton.State = state == MenuState.Play ? ButtonState.Expanded : ButtonState.Contracted;
|
|
||||||
settingsButton.State = state == MenuState.TopLevel ? ButtonState.Expanded : ButtonState.Contracted;
|
|
||||||
|
|
||||||
if (lastState == MenuState.Initial)
|
|
||||||
buttonArea.DelayReset();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user