mirror of https://github.com/ppy/osu
Modify MenuCursor hightlight animation
This commit is contained in:
parent
e37b931a55
commit
f9f192ce34
|
@ -67,12 +67,16 @@ protected override bool OnMouseMove(InputState state)
|
|||
}
|
||||
|
||||
protected override bool OnMouseDown(InputState state, MouseDownEventArgs args)
|
||||
{
|
||||
// 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);
|
||||
}
|
||||
|
||||
if (args.Button == MouseButton.Left && cursorRotate)
|
||||
{
|
||||
|
@ -86,7 +90,7 @@ protected override bool OnMouseUp(InputState state, MouseUpEventArgs args)
|
|||
{
|
||||
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 @@ protected override bool OnMouseUp(InputState state, MouseUpEventArgs args)
|
|||
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