mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 21:43:04 +08:00
Modify MenuCursor hightlight animation
This commit is contained in:
parent
e37b931a55
commit
f9f192ce34
@ -68,11 +68,15 @@ namespace osu.Game.Graphics.Cursor
|
||||
|
||||
protected override bool OnMouseDown(InputState state, MouseDownEventArgs args)
|
||||
{
|
||||
ActiveCursor.Scale = new Vector2(1);
|
||||
ActiveCursor.ScaleTo(0.90f, 800, Easing.OutQuint);
|
||||
// only trigger animation for main mouse buttons
|
||||
if (args.Button <= MouseButton.Right)
|
||||
{
|
||||
ActiveCursor.Scale = new Vector2(1);
|
||||
ActiveCursor.ScaleTo(0.90f, 800, Easing.OutQuint);
|
||||
|
||||
((Cursor)ActiveCursor).AdditiveLayer.Alpha = 0;
|
||||
((Cursor)ActiveCursor).AdditiveLayer.FadeInFromZero(800, Easing.OutQuint);
|
||||
((Cursor)ActiveCursor).AdditiveLayer.Alpha = 0;
|
||||
((Cursor)ActiveCursor).AdditiveLayer.FadeInFromZero(800, Easing.OutQuint);
|
||||
}
|
||||
|
||||
if (args.Button == MouseButton.Left && cursorRotate)
|
||||
{
|
||||
@ -86,7 +90,7 @@ namespace osu.Game.Graphics.Cursor
|
||||
{
|
||||
if (!state.Mouse.HasMainButtonPressed)
|
||||
{
|
||||
((Cursor)ActiveCursor).AdditiveLayer.FadeOut(500, Easing.OutQuint);
|
||||
((Cursor)ActiveCursor).AdditiveLayer.FadeOutFromOne(500, Easing.OutQuint);
|
||||
ActiveCursor.ScaleTo(1, 500, Easing.OutElastic);
|
||||
}
|
||||
|
||||
@ -99,13 +103,6 @@ namespace osu.Game.Graphics.Cursor
|
||||
return base.OnMouseUp(state, args);
|
||||
}
|
||||
|
||||
protected override bool OnClick(InputState state)
|
||||
{
|
||||
((Cursor)ActiveCursor).AdditiveLayer.FadeOutFromOne(500, Easing.OutQuint);
|
||||
|
||||
return base.OnClick(state);
|
||||
}
|
||||
|
||||
protected override void PopIn()
|
||||
{
|
||||
ActiveCursor.FadeTo(1, 250, Easing.OutQuint);
|
||||
|
Loading…
Reference in New Issue
Block a user