Change signature to new event handler

This commit is contained in:
ekrctb
2018-10-02 12:02:47 +09:00
parent 0d70306794
commit 99fc04c8af
110 changed files with 667 additions and 709 deletions

View File

@ -18,8 +18,7 @@ using OpenTK.Graphics;
using osu.Framework.Graphics.Shapes;
using osu.Game.Graphics.Containers;
using osu.Framework.Input.Bindings;
using osu.Framework.Input.EventArgs;
using osu.Framework.Input.States;
using osu.Framework.Input.Events;
using osu.Game.Input.Bindings;
namespace osu.Game.Screens.Play
@ -129,11 +128,11 @@ namespace osu.Game.Screens.Play
remainingTimeBox.ResizeWidthTo((float)Math.Max(0, 1 - (Time.Current - displayTime) / (beginFadeTime - displayTime)), 120, Easing.OutQuint);
}
protected override bool OnMouseMove(InputState state)
protected override bool OnMouseMove(MouseMoveEvent e)
{
if (!state.Mouse.HasAnyButtonPressed)
if (!e.Mouse.HasAnyButtonPressed)
fadeContainer.State = Visibility.Visible;
return base.OnMouseMove(state);
return base.OnMouseMove(e);
}
public bool OnPressed(GlobalAction action)
@ -194,16 +193,16 @@ namespace osu.Game.Screens.Play
State = Visibility.Visible;
}
protected override bool OnMouseDown(InputState state, MouseDownEventArgs args)
protected override bool OnMouseDown(MouseDownEvent e)
{
scheduledHide?.Cancel();
return base.OnMouseDown(state, args);
return base.OnMouseDown(e);
}
protected override bool OnMouseUp(InputState state, MouseUpEventArgs args)
protected override bool OnMouseUp(MouseUpEvent e)
{
State = Visibility.Visible;
return base.OnMouseUp(state, args);
return base.OnMouseUp(e);
}
}
@ -284,7 +283,7 @@ namespace osu.Game.Screens.Play
};
}
protected override bool OnHover(InputState state)
protected override bool OnHover(HoverEvent e)
{
flow.TransformSpacingTo(new Vector2(5), 500, Easing.OutQuint);
box.FadeColour(colourHover, 500, Easing.OutQuint);
@ -292,27 +291,27 @@ namespace osu.Game.Screens.Play
return true;
}
protected override void OnHoverLost(InputState state)
protected override void OnHoverLost(HoverLostEvent e)
{
flow.TransformSpacingTo(new Vector2(0), 500, Easing.OutQuint);
box.FadeColour(colourNormal, 500, Easing.OutQuint);
background.FadeTo(0.2f, 500, Easing.OutQuint);
base.OnHoverLost(state);
base.OnHoverLost(e);
}
protected override bool OnMouseDown(InputState state, MouseDownEventArgs args)
protected override bool OnMouseDown(MouseDownEvent e)
{
aspect.ScaleTo(0.75f, 2000, Easing.OutQuint);
return base.OnMouseDown(state, args);
return base.OnMouseDown(e);
}
protected override bool OnMouseUp(InputState state, MouseUpEventArgs args)
protected override bool OnMouseUp(MouseUpEvent e)
{
aspect.ScaleTo(1, 1000, Easing.OutElastic);
return base.OnMouseUp(state, args);
return base.OnMouseUp(e);
}
protected override bool OnClick(InputState state)
protected override bool OnClick(ClickEvent e)
{
if (!Enabled)
return false;
@ -322,7 +321,7 @@ namespace osu.Game.Screens.Play
box.FlashColour(Color4.White, 500, Easing.OutQuint);
aspect.ScaleTo(1.2f, 2000, Easing.OutQuint);
bool result = base.OnClick(state);
bool result = base.OnClick(e);
// for now, let's disable the skip button after the first press.
// this will likely need to be contextual in the future (bound from external components).