Merge branch 'buttonsystem-entermode' of https://github.com/nyquillerium/osu into buttonsystem-entermode

This commit is contained in:
Dean Herbert 2019-07-05 11:29:13 +09:00
commit e575c05e93
2 changed files with 19 additions and 1 deletions

View File

@ -9,6 +9,7 @@ using osu.Framework.Graphics;
using osu.Framework.Graphics.Colour;
using osu.Framework.Graphics.Shapes;
using osu.Game.Screens.Menu;
using osuTK;
using osuTK.Graphics;
namespace osu.Game.Tests.Visual.UserInterface
@ -43,6 +44,24 @@ namespace osu.Game.Tests.Visual.UserInterface
foreach (var s in Enum.GetValues(typeof(ButtonSystemState)).OfType<ButtonSystemState>().Skip(1))
AddStep($"State to {s}", () => buttons.State = s);
AddStep("Exiting menu", () =>
{
buttons.State = ButtonSystemState.EnteringMode;
buttons.FadeOut(400, Easing.InSine);
buttons.MoveTo(new Vector2(-800, 0), 400, Easing.InSine);
logo.FadeOut(300, Easing.InSine)
.ScaleTo(0.2f, 300, Easing.InSine);
});
AddStep("Entering menu", () =>
{
buttons.State = ButtonSystemState.Play;
buttons.FadeIn(400, Easing.OutQuint);
buttons.MoveTo(new Vector2(0), 400, Easing.OutQuint);
logo.FadeColour(Color4.White, 100, Easing.OutQuint);
logo.FadeIn(100, Easing.OutQuint);
});
}
}
}

View File

@ -332,7 +332,6 @@ namespace osu.Game.Screens.Menu
break;
case ButtonSystemState.EnteringMode:
// When coming from the Initial (untracked) state, interpolate to the tracking position over a brief duration instead of tracking immediately.
logoTrackingContainer.StartTracking(logo, lastState == ButtonSystemState.Initial ? 400 : 0, Easing.InSine);
break;
}