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

@ -5,7 +5,7 @@ using System.Linq;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Shapes;
using osu.Framework.Input.EventArgs; using osu.Framework.Input.Events;
using osu.Framework.Input.States; using osu.Framework.Input.States;
using osu.Game.Rulesets.Objects.Types; using osu.Game.Rulesets.Objects.Types;
using OpenTK.Graphics; using OpenTK.Graphics;
@ -104,22 +104,22 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
private InputState lastState; private InputState lastState;
protected override bool OnMouseDown(InputState state, MouseDownEventArgs args) protected override bool OnMouseDown(MouseDownEvent e)
{ {
lastState = state; lastState = state;
return base.OnMouseDown(state, args); return base.OnMouseDown(e);
} }
protected override bool OnMouseUp(InputState state, MouseUpEventArgs args) protected override bool OnMouseUp(MouseUpEvent e)
{ {
lastState = state; lastState = state;
return base.OnMouseUp(state, args); return base.OnMouseUp(e);
} }
protected override bool OnMouseMove(InputState state) protected override bool OnMouseMove(MouseMoveEvent e)
{ {
lastState = state; lastState = e;
return base.OnMouseMove(state); return base.OnMouseMove(e);
} }
public override void ClearTransformsAfter(double time, bool propagateChildren = false, string targetMember = null) public override void ClearTransformsAfter(double time, bool propagateChildren = false, string targetMember = null)

View File

@ -4,7 +4,7 @@
using System; using System;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Input.States; using osu.Framework.Input.Events;
using osu.Game.Graphics; using osu.Game.Graphics;
using OpenTK; using OpenTK;
using OpenTK.Graphics; using OpenTK.Graphics;
@ -68,10 +68,10 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces
} }
} }
protected override bool OnMouseMove(InputState state) protected override bool OnMouseMove(MouseMoveEvent e)
{ {
mousePosition = Parent.ToLocalSpace(state.Mouse.NativeState.Position); mousePosition = Parent.ToLocalSpace(e.Mouse.NativeState.Position);
return base.OnMouseMove(state); return base.OnMouseMove(e);
} }
private Vector2 mousePosition; private Vector2 mousePosition;

View File

@ -4,7 +4,7 @@
using System.Collections.Generic; using System.Collections.Generic;
using System.ComponentModel; using System.ComponentModel;
using osu.Framework.Input.Bindings; using osu.Framework.Input.Bindings;
using osu.Framework.Input.EventArgs; using osu.Framework.Input.Events;
using osu.Framework.Input.States; using osu.Framework.Input.States;
using osu.Game.Rulesets.UI; using osu.Game.Rulesets.UI;
@ -36,13 +36,13 @@ namespace osu.Game.Rulesets.Osu
{ {
} }
protected override bool OnKeyDown(InputState state, KeyDownEventArgs args) => AllowUserPresses && base.OnKeyDown(state, args); protected override bool OnKeyDown(KeyDownEvent e) => AllowUserPresses && base.OnKeyDown(e);
protected override bool OnKeyUp(InputState state, KeyUpEventArgs args) => AllowUserPresses && base.OnKeyUp(state, args); protected override bool OnKeyUp(KeyUpEvent e) => AllowUserPresses && base.OnKeyUp(e);
protected override bool OnJoystickPress(InputState state, JoystickEventArgs args) => AllowUserPresses && base.OnJoystickPress(state, args); protected override bool OnJoystickPress(InputState state, JoystickEventArgs args) => AllowUserPresses && base.OnJoystickPress(args);
protected override bool OnJoystickRelease(InputState state, JoystickEventArgs args) => AllowUserPresses && base.OnJoystickRelease(state, args); protected override bool OnJoystickRelease(InputState state, JoystickEventArgs args) => AllowUserPresses && base.OnJoystickRelease(args);
protected override bool OnMouseDown(InputState state, MouseDownEventArgs args) => AllowUserPresses && base.OnMouseDown(state, args); protected override bool OnMouseDown(MouseDownEvent e) => AllowUserPresses && base.OnMouseDown(e);
protected override bool OnMouseUp(InputState state, MouseUpEventArgs args) => AllowUserPresses && base.OnMouseUp(state, args); protected override bool OnMouseUp(MouseUpEvent e) => AllowUserPresses && base.OnMouseUp(e);
protected override bool OnScroll(InputState state) => AllowUserPresses && base.OnScroll(state); protected override bool OnScroll(ScrollEvent e) => AllowUserPresses && base.OnScroll(e);
} }
} }

View File

@ -12,7 +12,7 @@ using osu.Framework.Graphics.Primitives;
using osu.Framework.Graphics.Shaders; using osu.Framework.Graphics.Shaders;
using osu.Framework.Graphics.Textures; using osu.Framework.Graphics.Textures;
using osu.Framework.Input; using osu.Framework.Input;
using osu.Framework.Input.States; using osu.Framework.Input.Events;
using osu.Framework.Timing; using osu.Framework.Timing;
using OpenTK; using OpenTK;
using OpenTK.Graphics; using OpenTK.Graphics;
@ -117,15 +117,15 @@ namespace osu.Game.Rulesets.Osu.UI.Cursor
timeOffset = Time.Current; timeOffset = Time.Current;
} }
protected override bool OnMouseMove(InputState state) protected override bool OnMouseMove(MouseMoveEvent e)
{ {
Vector2 pos = state.Mouse.NativeState.Position; Vector2 pos = e.Mouse.NativeState.Position;
if (lastPosition == null) if (lastPosition == null)
{ {
lastPosition = pos; lastPosition = pos;
resampler.AddPosition(lastPosition.Value); resampler.AddPosition(lastPosition.Value);
return base.OnMouseMove(state); return base.OnMouseMove(e);
} }
foreach (Vector2 pos2 in resampler.AddPosition(pos)) foreach (Vector2 pos2 in resampler.AddPosition(pos))
@ -147,7 +147,7 @@ namespace osu.Game.Rulesets.Osu.UI.Cursor
} }
} }
return base.OnMouseMove(state); return base.OnMouseMove(e);
} }
private void addPosition(Vector2 pos) private void addPosition(Vector2 pos)

View File

@ -7,7 +7,7 @@ using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Cursor; using osu.Framework.Graphics.Cursor;
using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Shapes;
using osu.Framework.Input.States; using osu.Framework.Input.Events;
using osu.Framework.MathUtils; using osu.Framework.MathUtils;
using osu.Game.Graphics.Cursor; using osu.Game.Graphics.Cursor;
using osu.Game.Graphics.Sprites; using osu.Game.Graphics.Sprites;
@ -224,16 +224,16 @@ namespace osu.Game.Tests.Visual
}; };
} }
protected override bool OnHover(InputState state) protected override bool OnHover(HoverEvent e)
{ {
background.FadeTo(0.4f, 250, Easing.OutQuint); background.FadeTo(0.4f, 250, Easing.OutQuint);
return false; return false;
} }
protected override void OnHoverLost(InputState state) protected override void OnHoverLost(HoverLostEvent e)
{ {
background.FadeTo(0.1f, 250); background.FadeTo(0.1f, 250);
base.OnHoverLost(state); base.OnHoverLost(e);
} }
} }

View File

@ -8,7 +8,7 @@ using osu.Framework.Graphics.Containers;
using OpenTK; using OpenTK;
using osu.Framework.Configuration; using osu.Framework.Configuration;
using osu.Framework.Input.Bindings; using osu.Framework.Input.Bindings;
using osu.Framework.Input.States; using osu.Framework.Input.Events;
using osu.Game.Audio; using osu.Game.Audio;
using osu.Game.Input.Bindings; using osu.Game.Input.Bindings;
using osu.Game.Overlays; using osu.Game.Overlays;
@ -59,7 +59,7 @@ namespace osu.Game.Graphics.Containers
// receive input outside our bounds so we can trigger a close event on ourselves. // receive input outside our bounds so we can trigger a close event on ourselves.
public override bool ReceivePositionalInputAt(Vector2 screenSpacePos) => BlockScreenWideMouse || base.ReceivePositionalInputAt(screenSpacePos); public override bool ReceivePositionalInputAt(Vector2 screenSpacePos) => BlockScreenWideMouse || base.ReceivePositionalInputAt(screenSpacePos);
protected override bool OnClick(InputState state) protected override bool OnClick(ClickEvent e)
{ {
if (!base.ReceivePositionalInputAt(state.Mouse.NativeState.Position)) if (!base.ReceivePositionalInputAt(state.Mouse.NativeState.Position))
{ {
@ -67,7 +67,7 @@ namespace osu.Game.Graphics.Containers
return true; return true;
} }
return base.OnClick(state); return base.OnClick(e);
} }
public virtual bool OnPressed(GlobalAction action) public virtual bool OnPressed(GlobalAction action)

View File

@ -6,7 +6,7 @@ using OpenTK.Graphics;
using osu.Framework.Allocation; using osu.Framework.Allocation;
using osu.Framework.Extensions.IEnumerableExtensions; using osu.Framework.Extensions.IEnumerableExtensions;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Input.States; using osu.Framework.Input.Events;
namespace osu.Game.Graphics.Containers namespace osu.Game.Graphics.Containers
{ {
@ -18,16 +18,16 @@ namespace osu.Game.Graphics.Containers
protected virtual IEnumerable<Drawable> EffectTargets => new[] { Content }; protected virtual IEnumerable<Drawable> EffectTargets => new[] { Content };
protected override bool OnHover(InputState state) protected override bool OnHover(HoverEvent e)
{ {
EffectTargets.ForEach(d => d.FadeColour(HoverColour, 500, Easing.OutQuint)); EffectTargets.ForEach(d => d.FadeColour(HoverColour, 500, Easing.OutQuint));
return base.OnHover(state); return base.OnHover(e);
} }
protected override void OnHoverLost(InputState state) protected override void OnHoverLost(HoverLostEvent e)
{ {
EffectTargets.ForEach(d => d.FadeColour(IdleColour, 500, Easing.OutQuint)); EffectTargets.ForEach(d => d.FadeColour(IdleColour, 500, Easing.OutQuint));
base.OnHoverLost(state); base.OnHoverLost(e);
} }
[BackgroundDependencyLoader] [BackgroundDependencyLoader]

View File

@ -2,7 +2,7 @@
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Input.EventArgs; using osu.Framework.Input.Events;
using osu.Framework.Input.States; using osu.Framework.Input.States;
using OpenTK.Input; using OpenTK.Input;
@ -29,7 +29,7 @@ namespace osu.Game.Graphics.Containers
protected override bool IsDragging => base.IsDragging || mouseScrollBarDragging; protected override bool IsDragging => base.IsDragging || mouseScrollBarDragging;
protected override bool OnMouseDown(InputState state, MouseDownEventArgs args) protected override bool OnMouseDown(MouseDownEvent e)
{ {
if (shouldPerformRightMouseScroll(state)) if (shouldPerformRightMouseScroll(state))
{ {
@ -37,32 +37,32 @@ namespace osu.Game.Graphics.Containers
return true; return true;
} }
return base.OnMouseDown(state, args); return base.OnMouseDown(e);
} }
protected override bool OnDrag(InputState state) protected override bool OnDrag(DragEvent e)
{ {
if (mouseScrollBarDragging) if (mouseScrollBarDragging)
{ {
scrollToRelative(state.Mouse.Position[ScrollDim]); scrollToRelative(e.Mouse.Position[ScrollDim]);
return true; return true;
} }
return base.OnDrag(state); return base.OnDrag(e);
} }
protected override bool OnDragStart(InputState state) protected override bool OnDragStart(DragStartEvent e)
{ {
if (shouldPerformRightMouseScroll(state)) if (shouldPerformRightMouseScroll(e))
{ {
mouseScrollBarDragging = true; mouseScrollBarDragging = true;
return true; return true;
} }
return base.OnDragStart(state); return base.OnDragStart(e);
} }
protected override bool OnDragEnd(InputState state) protected override bool OnDragEnd(DragEndEvent e)
{ {
if (mouseScrollBarDragging) if (mouseScrollBarDragging)
{ {
@ -70,7 +70,7 @@ namespace osu.Game.Graphics.Containers
return true; return true;
} }
return base.OnDragEnd(state); return base.OnDragEnd(e);
} }
} }
} }

View File

@ -12,8 +12,7 @@ using osu.Game.Configuration;
using System; using System;
using JetBrains.Annotations; using JetBrains.Annotations;
using osu.Framework.Graphics.Textures; using osu.Framework.Graphics.Textures;
using osu.Framework.Input.EventArgs; using osu.Framework.Input.Events;
using osu.Framework.Input.States;
using OpenTK.Input; using OpenTK.Input;
namespace osu.Game.Graphics.Cursor namespace osu.Game.Graphics.Cursor
@ -40,11 +39,11 @@ namespace osu.Game.Graphics.Cursor
screenshotCursorVisibility.BindTo(screenshotManager.CursorVisibility); screenshotCursorVisibility.BindTo(screenshotManager.CursorVisibility);
} }
protected override bool OnMouseMove(InputState state) protected override bool OnMouseMove(MouseMoveEvent e)
{ {
if (dragRotationState != DragRotationState.NotDragging) if (dragRotationState != DragRotationState.NotDragging)
{ {
var position = state.Mouse.Position; var position = e.Mouse.Position;
var distance = Vector2Extensions.Distance(position, positionMouseDown); var distance = Vector2Extensions.Distance(position, positionMouseDown);
// don't start rotating until we're moved a minimum distance away from the mouse down location, // don't start rotating until we're moved a minimum distance away from the mouse down location,
// else it can have an annoying effect. // else it can have an annoying effect.
@ -53,7 +52,7 @@ namespace osu.Game.Graphics.Cursor
// don't rotate when distance is zero to avoid NaN // don't rotate when distance is zero to avoid NaN
if (dragRotationState == DragRotationState.Rotating && distance > 0) if (dragRotationState == DragRotationState.Rotating && distance > 0)
{ {
Vector2 offset = state.Mouse.Position - positionMouseDown; Vector2 offset = e.Mouse.Position - positionMouseDown;
float degrees = (float)MathHelper.RadiansToDegrees(Math.Atan2(-offset.X, offset.Y)) + 24.3f; float degrees = (float)MathHelper.RadiansToDegrees(Math.Atan2(-offset.X, offset.Y)) + 24.3f;
// Always rotate in the direction of least distance // Always rotate in the direction of least distance
@ -66,13 +65,13 @@ namespace osu.Game.Graphics.Cursor
} }
} }
return base.OnMouseMove(state); return base.OnMouseMove(e);
} }
protected override bool OnMouseDown(InputState state, MouseDownEventArgs args) protected override bool OnMouseDown(MouseDownEvent e)
{ {
// only trigger animation for main mouse buttons // only trigger animation for main mouse buttons
if (args.Button <= MouseButton.Right) if (e.Button <= MouseButton.Right)
{ {
activeCursor.Scale = new Vector2(1); activeCursor.Scale = new Vector2(1);
activeCursor.ScaleTo(0.90f, 800, Easing.OutQuint); activeCursor.ScaleTo(0.90f, 800, Easing.OutQuint);
@ -81,15 +80,15 @@ namespace osu.Game.Graphics.Cursor
activeCursor.AdditiveLayer.FadeInFromZero(800, Easing.OutQuint); activeCursor.AdditiveLayer.FadeInFromZero(800, Easing.OutQuint);
} }
if (args.Button == MouseButton.Left && cursorRotate) if (e.Button == MouseButton.Left && cursorRotate)
{ {
dragRotationState = DragRotationState.DragStarted; dragRotationState = DragRotationState.DragStarted;
positionMouseDown = state.Mouse.Position; positionMouseDown = state.Mouse.Position;
} }
return base.OnMouseDown(state, args); return base.OnMouseDown(e);
} }
protected override bool OnMouseUp(InputState state, MouseUpEventArgs args) protected override bool OnMouseUp(MouseUpEvent e)
{ {
if (!state.Mouse.HasMainButtonPressed) if (!state.Mouse.HasMainButtonPressed)
{ {
@ -97,13 +96,13 @@ namespace osu.Game.Graphics.Cursor
activeCursor.ScaleTo(1, 500, Easing.OutElastic); activeCursor.ScaleTo(1, 500, Easing.OutElastic);
} }
if (args.Button == MouseButton.Left) if (e.Button == MouseButton.Left)
{ {
if (dragRotationState == DragRotationState.Rotating) if (dragRotationState == DragRotationState.Rotating)
activeCursor.RotateTo(0, 600 * (1 + Math.Abs(activeCursor.Rotation / 720)), Easing.OutElasticHalf); activeCursor.RotateTo(0, 600 * (1 + Math.Abs(activeCursor.Rotation / 720)), Easing.OutElasticHalf);
dragRotationState = DragRotationState.NotDragging; dragRotationState = DragRotationState.NotDragging;
} }
return base.OnMouseUp(state, args); return base.OnMouseUp(e);
} }
protected override void PopIn() protected override void PopIn()

View File

@ -13,7 +13,7 @@ using osu.Game.Graphics.Sprites;
using osu.Framework.Extensions.Color4Extensions; using osu.Framework.Extensions.Color4Extensions;
using osu.Game.Graphics.Containers; using osu.Game.Graphics.Containers;
using osu.Framework.Configuration; using osu.Framework.Configuration;
using osu.Framework.Input.States; using osu.Framework.Input.Events;
namespace osu.Game.Graphics.UserInterface namespace osu.Game.Graphics.UserInterface
{ {
@ -213,7 +213,7 @@ namespace osu.Game.Graphics.UserInterface
public override bool ReceivePositionalInputAt(Vector2 screenSpacePos) => backgroundContainer.ReceivePositionalInputAt(screenSpacePos); public override bool ReceivePositionalInputAt(Vector2 screenSpacePos) => backgroundContainer.ReceivePositionalInputAt(screenSpacePos);
protected override bool OnClick(InputState state) protected override bool OnClick(ClickEvent e)
{ {
colourContainer.ResizeTo(new Vector2(1.5f, 1f), click_duration, Easing.In); colourContainer.ResizeTo(new Vector2(1.5f, 1f), click_duration, Easing.In);
flash(); flash();
@ -225,20 +225,20 @@ namespace osu.Game.Graphics.UserInterface
glowContainer.FadeOut(); glowContainer.FadeOut();
}); });
return base.OnClick(state); return base.OnClick(e);
} }
protected override bool OnHover(InputState state) protected override bool OnHover(HoverEvent e)
{ {
base.OnHover(state); base.OnHover(e);
Selected.Value = true; Selected.Value = true;
return true; return true;
} }
protected override void OnHoverLost(InputState state) protected override void OnHoverLost(HoverLostEvent e)
{ {
base.OnHoverLost(state); base.OnHoverLost(e);
Selected.Value = false; Selected.Value = false;
} }

View File

@ -5,7 +5,7 @@ using osu.Framework.Allocation;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Cursor; using osu.Framework.Graphics.Cursor;
using osu.Framework.Input.States; using osu.Framework.Input.Events;
using osu.Framework.Platform; using osu.Framework.Platform;
using OpenTK; using OpenTK;
using OpenTK.Graphics; using OpenTK.Graphics;
@ -37,19 +37,19 @@ namespace osu.Game.Graphics.UserInterface
this.host = host; this.host = host;
} }
protected override bool OnHover(InputState state) protected override bool OnHover(HoverEvent e)
{ {
InternalChild.FadeColour(hoverColour, 500, Easing.OutQuint); InternalChild.FadeColour(hoverColour, 500, Easing.OutQuint);
return base.OnHover(state); return base.OnHover(e);
} }
protected override void OnHoverLost(InputState state) protected override void OnHoverLost(HoverLostEvent e)
{ {
InternalChild.FadeColour(Color4.White, 500, Easing.OutQuint); InternalChild.FadeColour(Color4.White, 500, Easing.OutQuint);
base.OnHoverLost(state); base.OnHoverLost(e);
} }
protected override bool OnClick(InputState state) protected override bool OnClick(ClickEvent e)
{ {
if(Link != null) if(Link != null)
host.OpenUrlExternally(Link); host.OpenUrlExternally(Link);

View File

@ -3,8 +3,7 @@
using OpenTK.Graphics; using OpenTK.Graphics;
using System; using System;
using osu.Framework.Input.EventArgs; using osu.Framework.Input.Events;
using osu.Framework.Input.States;
using osu.Game.Input.Bindings; using osu.Game.Input.Bindings;
using OpenTK.Input; using OpenTK.Input;
@ -36,20 +35,20 @@ namespace osu.Game.Graphics.UserInterface
// We may not be focused yet, but we need to handle keyboard input to be able to request focus // We may not be focused yet, but we need to handle keyboard input to be able to request focus
public override bool HandleNonPositionalInput => HoldFocus || base.HandleNonPositionalInput; public override bool HandleNonPositionalInput => HoldFocus || base.HandleNonPositionalInput;
protected override void OnFocus(InputState state) protected override void OnFocus(FocusEvent e)
{ {
base.OnFocus(state); base.OnFocus(e);
BorderThickness = 0; BorderThickness = 0;
} }
protected override bool OnKeyDown(InputState state, KeyDownEventArgs args) protected override bool OnKeyDown(KeyDownEvent e)
{ {
if (!HasFocus) return false; if (!HasFocus) return false;
if (args.Key == Key.Escape) if (e.Key == Key.Escape)
return false; // disable the framework-level handling of escape key for confority (we use GlobalAction.Back). return false; // disable the framework-level handling of escape key for confority (we use GlobalAction.Back).
return base.OnKeyDown(state, args); return base.OnKeyDown(e);
} }
public override bool OnPressed(GlobalAction action) public override bool OnPressed(GlobalAction action)

View File

@ -5,7 +5,7 @@ using osu.Framework.Allocation;
using osu.Framework.Audio; using osu.Framework.Audio;
using osu.Framework.Audio.Sample; using osu.Framework.Audio.Sample;
using osu.Framework.Extensions; using osu.Framework.Extensions;
using osu.Framework.Input.States; using osu.Framework.Input.Events;
namespace osu.Game.Graphics.UserInterface namespace osu.Game.Graphics.UserInterface
{ {
@ -21,10 +21,10 @@ namespace osu.Game.Graphics.UserInterface
{ {
} }
protected override bool OnClick(InputState state) protected override bool OnClick(ClickEvent e)
{ {
sampleClick?.Play(); sampleClick?.Play();
return base.OnClick(state); return base.OnClick(e);
} }
[BackgroundDependencyLoader] [BackgroundDependencyLoader]

View File

@ -8,7 +8,7 @@ using osu.Framework.Audio.Sample;
using osu.Framework.Extensions; using osu.Framework.Extensions;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Input.States; using osu.Framework.Input.Events;
namespace osu.Game.Graphics.UserInterface namespace osu.Game.Graphics.UserInterface
{ {
@ -28,10 +28,10 @@ namespace osu.Game.Graphics.UserInterface
RelativeSizeAxes = Axes.Both; RelativeSizeAxes = Axes.Both;
} }
protected override bool OnHover(InputState state) protected override bool OnHover(HoverEvent e)
{ {
sampleHover?.Play(); sampleHover?.Play();
return base.OnHover(state); return base.OnHover(e);
} }
[BackgroundDependencyLoader] [BackgroundDependencyLoader]

View File

@ -4,7 +4,7 @@
using OpenTK; using OpenTK;
using OpenTK.Graphics; using OpenTK.Graphics;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Input.States; using osu.Framework.Input.Events;
namespace osu.Game.Graphics.UserInterface namespace osu.Game.Graphics.UserInterface
{ {
@ -84,16 +84,16 @@ namespace osu.Game.Graphics.UserInterface
}); });
} }
protected override bool OnHover(InputState state) protected override bool OnHover(HoverEvent e)
{ {
icon.FadeColour(IconHoverColour, 500, Easing.OutQuint); icon.FadeColour(IconHoverColour, 500, Easing.OutQuint);
return base.OnHover(state); return base.OnHover(e);
} }
protected override void OnHoverLost(InputState state) protected override void OnHoverLost(HoverLostEvent e)
{ {
icon.FadeColour(IconColour, 500, Easing.OutQuint); icon.FadeColour(IconColour, 500, Easing.OutQuint);
base.OnHoverLost(state); base.OnHoverLost(e);
} }
} }
} }

View File

@ -6,8 +6,7 @@ using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Shapes;
using osu.Framework.Input.EventArgs; using osu.Framework.Input.Events;
using osu.Framework.Input.States;
using osu.Game.Graphics.Containers; using osu.Game.Graphics.Containers;
using OpenTK.Graphics; using OpenTK.Graphics;
@ -77,34 +76,34 @@ namespace osu.Game.Graphics.UserInterface
Enabled.BindValueChanged(enabled => this.FadeColour(enabled ? Color4.White : colours.Gray9, 200, Easing.OutQuint), true); Enabled.BindValueChanged(enabled => this.FadeColour(enabled ? Color4.White : colours.Gray9, 200, Easing.OutQuint), true);
} }
protected override bool OnHover(InputState state) protected override bool OnHover(HoverEvent e)
{ {
hover.FadeIn(500, Easing.OutQuint); hover.FadeIn(500, Easing.OutQuint);
return base.OnHover(state); return base.OnHover(e);
} }
protected override void OnHoverLost(InputState state) protected override void OnHoverLost(HoverLostEvent e)
{ {
hover.FadeOut(500, Easing.OutQuint); hover.FadeOut(500, Easing.OutQuint);
base.OnHoverLost(state); base.OnHoverLost(e);
} }
protected override bool OnClick(InputState state) protected override bool OnClick(ClickEvent e)
{ {
hover.FlashColour(FlashColour, 800, Easing.OutQuint); hover.FlashColour(FlashColour, 800, Easing.OutQuint);
return base.OnClick(state); return base.OnClick(e);
} }
protected override bool OnMouseDown(InputState state, MouseDownEventArgs args) protected override bool OnMouseDown(MouseDownEvent e)
{ {
Content.ScaleTo(0.75f, 2000, Easing.OutQuint); Content.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)
{ {
Content.ScaleTo(1, 1000, Easing.OutElastic); Content.ScaleTo(1, 1000, Easing.OutElastic);
return base.OnMouseUp(state, args); return base.OnMouseUp(e);
} }
} }
} }

View File

@ -7,8 +7,7 @@ using osu.Framework.Graphics;
using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Shapes;
using osu.Framework.Graphics.Sprites; using osu.Framework.Graphics.Sprites;
using osu.Framework.Graphics.UserInterface; using osu.Framework.Graphics.UserInterface;
using osu.Framework.Input.EventArgs; using osu.Framework.Input.Events;
using osu.Framework.Input.States;
using osu.Game.Graphics.Sprites; using osu.Game.Graphics.Sprites;
using OpenTK.Graphics; using OpenTK.Graphics;
@ -56,28 +55,28 @@ namespace osu.Game.Graphics.UserInterface
this.FadeColour(enabled ? Color4.White : Color4.Gray, 200, Easing.OutQuint); this.FadeColour(enabled ? Color4.White : Color4.Gray, 200, Easing.OutQuint);
} }
protected override bool OnHover(InputState state) protected override bool OnHover(HoverEvent e)
{ {
hover.FadeIn(200); hover.FadeIn(200);
return base.OnHover(state); return base.OnHover(e);
} }
protected override void OnHoverLost(InputState state) protected override void OnHoverLost(HoverLostEvent e)
{ {
hover.FadeOut(200); hover.FadeOut(200);
base.OnHoverLost(state); base.OnHoverLost(e);
} }
protected override bool OnMouseDown(InputState state, MouseDownEventArgs args) protected override bool OnMouseDown(MouseDownEvent e)
{ {
Content.ScaleTo(0.9f, 4000, Easing.OutQuint); Content.ScaleTo(0.9f, 4000, 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)
{ {
Content.ScaleTo(1, 1000, Easing.OutElastic); Content.ScaleTo(1, 1000, Easing.OutElastic);
return base.OnMouseUp(state, args); return base.OnMouseUp(e);
} }
protected override SpriteText CreateText() => new OsuSpriteText protected override SpriteText CreateText() => new OsuSpriteText

View File

@ -8,7 +8,7 @@ using osu.Framework.Configuration;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Sprites; using osu.Framework.Graphics.Sprites;
using osu.Framework.Graphics.UserInterface; using osu.Framework.Graphics.UserInterface;
using osu.Framework.Input.States; using osu.Framework.Input.Events;
using osu.Game.Graphics.Sprites; using osu.Game.Graphics.Sprites;
using OpenTK.Graphics; using OpenTK.Graphics;
@ -95,18 +95,18 @@ namespace osu.Game.Graphics.UserInterface
}; };
} }
protected override bool OnHover(InputState state) protected override bool OnHover(HoverEvent e)
{ {
Nub.Glowing = true; Nub.Glowing = true;
Nub.Expanded = true; Nub.Expanded = true;
return base.OnHover(state); return base.OnHover(e);
} }
protected override void OnHoverLost(InputState state) protected override void OnHoverLost(HoverLostEvent e)
{ {
Nub.Glowing = false; Nub.Glowing = false;
Nub.Expanded = false; Nub.Expanded = false;
base.OnHoverLost(state); base.OnHoverLost(e);
} }
[BackgroundDependencyLoader] [BackgroundDependencyLoader]

View File

@ -10,7 +10,7 @@ using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Sprites; using osu.Framework.Graphics.Sprites;
using osu.Framework.Graphics.UserInterface; using osu.Framework.Graphics.UserInterface;
using osu.Framework.Input.States; using osu.Framework.Input.Events;
using osu.Game.Graphics.Sprites; using osu.Game.Graphics.Sprites;
using OpenTK; using OpenTK;
@ -97,25 +97,25 @@ namespace osu.Game.Graphics.UserInterface
} }
} }
protected override bool OnHover(InputState state) protected override bool OnHover(HoverEvent e)
{ {
sampleHover.Play(); sampleHover.Play();
text.BoldText.FadeIn(transition_length, Easing.OutQuint); text.BoldText.FadeIn(transition_length, Easing.OutQuint);
text.NormalText.FadeOut(transition_length, Easing.OutQuint); text.NormalText.FadeOut(transition_length, Easing.OutQuint);
return base.OnHover(state); return base.OnHover(e);
} }
protected override void OnHoverLost(InputState state) protected override void OnHoverLost(HoverLostEvent e)
{ {
text.BoldText.FadeOut(transition_length, Easing.OutQuint); text.BoldText.FadeOut(transition_length, Easing.OutQuint);
text.NormalText.FadeIn(transition_length, Easing.OutQuint); text.NormalText.FadeIn(transition_length, Easing.OutQuint);
base.OnHoverLost(state); base.OnHoverLost(e);
} }
protected override bool OnClick(InputState state) protected override bool OnClick(ClickEvent e)
{ {
sampleClick.Play(); sampleClick.Play();
return base.OnClick(state); return base.OnClick(e);
} }
protected sealed override Drawable CreateContent() => text = CreateTextContainer(); protected sealed override Drawable CreateContent() => text = CreateTextContainer();

View File

@ -9,8 +9,7 @@ using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Cursor; using osu.Framework.Graphics.Cursor;
using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Shapes;
using osu.Framework.Input.EventArgs; using osu.Framework.Input.Events;
using osu.Framework.Input.States;
using osu.Framework.Platform; using osu.Framework.Platform;
namespace osu.Game.Graphics.UserInterface namespace osu.Game.Graphics.UserInterface
@ -43,23 +42,23 @@ namespace osu.Game.Graphics.UserInterface
this.host = host; this.host = host;
} }
protected override bool OnKeyDown(InputState state, KeyDownEventArgs args) protected override bool OnKeyDown(KeyDownEvent e)
{ {
if (args.Key == Key.CapsLock) if (e.Key == Key.CapsLock)
updateCapsWarning(host.CapsLockEnabled); updateCapsWarning(host.CapsLockEnabled);
return base.OnKeyDown(state, args); return base.OnKeyDown(e);
} }
protected override void OnFocus(InputState state) protected override void OnFocus(FocusEvent e)
{ {
updateCapsWarning(host.CapsLockEnabled); updateCapsWarning(host.CapsLockEnabled);
base.OnFocus(state); base.OnFocus(e);
} }
protected override void OnFocusLost(InputState state) protected override void OnFocusLost(FocusLostEvent e)
{ {
updateCapsWarning(false); updateCapsWarning(false);
base.OnFocusLost(state); base.OnFocusLost(e);
} }
private void updateCapsWarning(bool visible) => warning.FadeTo(visible ? 1 : 0, 250, Easing.OutQuint); private void updateCapsWarning(bool visible) => warning.FadeTo(visible ? 1 : 0, 250, Easing.OutQuint);

View File

@ -13,8 +13,7 @@ using osu.Framework.Graphics;
using osu.Framework.Graphics.UserInterface; using osu.Framework.Graphics.UserInterface;
using osu.Framework.Graphics.Cursor; using osu.Framework.Graphics.Cursor;
using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Shapes;
using osu.Framework.Input.EventArgs; using osu.Framework.Input.Events;
using osu.Framework.Input.States;
namespace osu.Game.Graphics.UserInterface namespace osu.Game.Graphics.UserInterface
{ {
@ -125,16 +124,16 @@ namespace osu.Game.Graphics.UserInterface
AccentColour = colours.Pink; AccentColour = colours.Pink;
} }
protected override bool OnHover(InputState state) protected override bool OnHover(HoverEvent e)
{ {
Nub.Glowing = true; Nub.Glowing = true;
return base.OnHover(state); return base.OnHover(e);
} }
protected override void OnHoverLost(InputState state) protected override void OnHoverLost(HoverLostEvent e)
{ {
Nub.Glowing = false; Nub.Glowing = false;
base.OnHoverLost(state); base.OnHoverLost(e);
} }
protected override void OnUserChange() protected override void OnUserChange()
@ -164,16 +163,16 @@ namespace osu.Game.Graphics.UserInterface
sample.Play(); sample.Play();
} }
protected override bool OnMouseDown(InputState state, MouseDownEventArgs args) protected override bool OnMouseDown(MouseDownEvent e)
{ {
Nub.Current.Value = true; Nub.Current.Value = true;
return base.OnMouseDown(state, args); return base.OnMouseDown(e);
} }
protected override bool OnMouseUp(InputState state, MouseUpEventArgs args) protected override bool OnMouseUp(MouseUpEvent e)
{ {
Nub.Current.Value = false; Nub.Current.Value = false;
return base.OnMouseUp(state, args); return base.OnMouseUp(e);
} }
protected override void UpdateAfterChildren() protected override void UpdateAfterChildren()

View File

@ -14,7 +14,7 @@ using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Shapes;
using osu.Framework.Graphics.Sprites; using osu.Framework.Graphics.Sprites;
using osu.Framework.Graphics.UserInterface; using osu.Framework.Graphics.UserInterface;
using osu.Framework.Input.States; using osu.Framework.Input.Events;
using osu.Framework.MathUtils; using osu.Framework.MathUtils;
using osu.Game.Graphics.Sprites; using osu.Game.Graphics.Sprites;
@ -126,14 +126,14 @@ namespace osu.Game.Graphics.UserInterface
Text.FadeColour(AccentColour, transition_length, Easing.OutQuint); Text.FadeColour(AccentColour, transition_length, Easing.OutQuint);
} }
protected override bool OnHover(InputState state) protected override bool OnHover(HoverEvent e)
{ {
if (!Active) if (!Active)
fadeActive(); fadeActive();
return true; return true;
} }
protected override void OnHoverLost(InputState state) protected override void OnHoverLost(HoverLostEvent e)
{ {
if (!Active) if (!Active)
fadeInactive(); fadeInactive();
@ -265,16 +265,16 @@ namespace osu.Game.Graphics.UserInterface
Padding = new MarginPadding { Left = 5, Right = 5 }; Padding = new MarginPadding { Left = 5, Right = 5 };
} }
protected override bool OnHover(InputState state) protected override bool OnHover(HoverEvent e)
{ {
Foreground.Colour = BackgroundColour; Foreground.Colour = BackgroundColour;
return base.OnHover(state); return base.OnHover(e);
} }
protected override void OnHoverLost(InputState state) protected override void OnHoverLost(HoverLostEvent e)
{ {
Foreground.Colour = BackgroundColourHover; Foreground.Colour = BackgroundColourHover;
base.OnHoverLost(state); base.OnHoverLost(e);
} }
} }
} }

View File

@ -10,7 +10,7 @@ using osu.Framework.Graphics.Shapes;
using osu.Game.Graphics.Sprites; using osu.Game.Graphics.Sprites;
using osu.Framework.Graphics.Sprites; using osu.Framework.Graphics.Sprites;
using osu.Framework.Graphics.UserInterface; using osu.Framework.Graphics.UserInterface;
using osu.Framework.Input.States; using osu.Framework.Input.Events;
namespace osu.Game.Graphics.UserInterface namespace osu.Game.Graphics.UserInterface
{ {
@ -59,18 +59,18 @@ namespace osu.Game.Graphics.UserInterface
text.FadeColour(AccentColour, transition_length, Easing.OutQuint); text.FadeColour(AccentColour, transition_length, Easing.OutQuint);
} }
protected override bool OnHover(InputState state) protected override bool OnHover(HoverEvent e)
{ {
fadeIn(); fadeIn();
return base.OnHover(state); return base.OnHover(e);
} }
protected override void OnHoverLost(InputState state) protected override void OnHoverLost(HoverLostEvent e)
{ {
if (!Current) if (!Current)
fadeOut(); fadeOut();
base.OnHoverLost(state); base.OnHoverLost(e);
} }
[BackgroundDependencyLoader] [BackgroundDependencyLoader]

View File

@ -9,7 +9,7 @@ using osu.Game.Graphics.Sprites;
using OpenTK.Graphics; using OpenTK.Graphics;
using osu.Framework.Extensions.Color4Extensions; using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Input.Bindings; using osu.Framework.Input.Bindings;
using osu.Framework.Input.States; using osu.Framework.Input.Events;
using osu.Game.Input.Bindings; using osu.Game.Input.Bindings;
namespace osu.Game.Graphics.UserInterface namespace osu.Game.Graphics.UserInterface
@ -44,17 +44,17 @@ namespace osu.Game.Graphics.UserInterface
BorderColour = colour.Yellow; BorderColour = colour.Yellow;
} }
protected override void OnFocus(InputState state) protected override void OnFocus(FocusEvent e)
{ {
BorderThickness = 3; BorderThickness = 3;
base.OnFocus(state); base.OnFocus(e);
} }
protected override void OnFocusLost(InputState state) protected override void OnFocusLost(FocusLostEvent e)
{ {
BorderThickness = 0; BorderThickness = 0;
base.OnFocusLost(state); base.OnFocusLost(e);
} }
protected override Drawable GetDrawableCharacter(char c) => new OsuSpriteText { Text = c.ToString(), TextSize = CalculatedTextSize }; protected override Drawable GetDrawableCharacter(char c) => new OsuSpriteText { Text = c.ToString(), TextSize = CalculatedTextSize };

View File

@ -10,7 +10,7 @@ using osu.Framework.Graphics;
using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Shapes;
using osu.Framework.Graphics.Sprites; using osu.Framework.Graphics.Sprites;
using osu.Framework.Graphics.UserInterface; using osu.Framework.Graphics.UserInterface;
using osu.Framework.Input.States; using osu.Framework.Input.Events;
using osu.Game.Graphics.Sprites; using osu.Game.Graphics.Sprites;
namespace osu.Game.Graphics.UserInterface namespace osu.Game.Graphics.UserInterface
@ -67,14 +67,14 @@ namespace osu.Game.Graphics.UserInterface
box.Colour = colours.Yellow; box.Colour = colours.Yellow;
} }
protected override bool OnHover(InputState state) protected override bool OnHover(HoverEvent e)
{ {
if (!Active) if (!Active)
slideActive(); slideActive();
return true; return true;
} }
protected override void OnHoverLost(InputState state) protected override void OnHoverLost(HoverLostEvent e)
{ {
if (!Active) if (!Active)
slideInactive(); slideInactive();

View File

@ -2,8 +2,7 @@
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Input.EventArgs; using osu.Framework.Input.Events;
using osu.Framework.Input.States;
using OpenTK; using OpenTK;
using OpenTK.Input; using OpenTK.Input;
@ -33,11 +32,11 @@ namespace osu.Game.Graphics.UserInterface
PlaceholderText = "type to search"; PlaceholderText = "type to search";
} }
protected override bool OnKeyDown(InputState state, KeyDownEventArgs args) protected override bool OnKeyDown(KeyDownEvent e)
{ {
if (!state.Keyboard.ControlPressed && !state.Keyboard.ShiftPressed) if (!state.Keyboard.ControlPressed && !state.Keyboard.ShiftPressed)
{ {
switch (args.Key) switch (e.Key)
{ {
case Key.Left: case Key.Left:
case Key.Right: case Key.Right:
@ -49,7 +48,7 @@ namespace osu.Game.Graphics.UserInterface
if (!AllowCommit) if (!AllowCommit)
{ {
switch (args.Key) switch (e.Key)
{ {
case Key.KeypadEnter: case Key.KeypadEnter:
case Key.Enter: case Key.Enter:
@ -59,14 +58,14 @@ namespace osu.Game.Graphics.UserInterface
if (state.Keyboard.ShiftPressed) if (state.Keyboard.ShiftPressed)
{ {
switch (args.Key) switch (e.Key)
{ {
case Key.Delete: case Key.Delete:
return false; return false;
} }
} }
return base.OnKeyDown(state, args); return base.OnKeyDown(e);
} }
} }
} }

View File

@ -13,8 +13,7 @@ using osu.Game.Beatmaps.ControlPoints;
using osu.Framework.Audio.Track; using osu.Framework.Audio.Track;
using System; using System;
using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Shapes;
using osu.Framework.Input.EventArgs; using osu.Framework.Input.Events;
using osu.Framework.Input.States;
namespace osu.Game.Graphics.UserInterface namespace osu.Game.Graphics.UserInterface
{ {
@ -172,7 +171,7 @@ namespace osu.Game.Graphics.UserInterface
public override bool ReceivePositionalInputAt(Vector2 screenSpacePos) => IconLayer.ReceivePositionalInputAt(screenSpacePos) || TextLayer.ReceivePositionalInputAt(screenSpacePos); public override bool ReceivePositionalInputAt(Vector2 screenSpacePos) => IconLayer.ReceivePositionalInputAt(screenSpacePos) || TextLayer.ReceivePositionalInputAt(screenSpacePos);
protected override bool OnHover(InputState state) protected override bool OnHover(HoverEvent e)
{ {
this.ResizeTo(SIZE_EXTENDED, transform_time, Easing.OutElastic); this.ResizeTo(SIZE_EXTENDED, transform_time, Easing.OutElastic);
IconLayer.FadeColour(HoverColour, transform_time, Easing.OutElastic); IconLayer.FadeColour(HoverColour, transform_time, Easing.OutElastic);
@ -182,7 +181,7 @@ namespace osu.Game.Graphics.UserInterface
return true; return true;
} }
protected override void OnHoverLost(InputState state) protected override void OnHoverLost(HoverLostEvent e)
{ {
this.ResizeTo(SIZE_RETRACTED, transform_time, Easing.OutElastic); this.ResizeTo(SIZE_RETRACTED, transform_time, Easing.OutElastic);
IconLayer.FadeColour(TextLayer.Colour, transform_time, Easing.OutElastic); IconLayer.FadeColour(TextLayer.Colour, transform_time, Easing.OutElastic);
@ -190,12 +189,12 @@ namespace osu.Game.Graphics.UserInterface
bouncingIcon.ScaleTo(1, transform_time, Easing.OutElastic); bouncingIcon.ScaleTo(1, transform_time, Easing.OutElastic);
} }
protected override bool OnMouseDown(InputState state, MouseDownEventArgs args) protected override bool OnMouseDown(MouseDownEvent e)
{ {
return true; return true;
} }
protected override bool OnClick(InputState state) protected override bool OnClick(ClickEvent e)
{ {
var flash = new Box var flash = new Box
{ {
@ -209,7 +208,7 @@ namespace osu.Game.Graphics.UserInterface
flash.FadeOut(500, Easing.OutQuint); flash.FadeOut(500, Easing.OutQuint);
flash.Expire(); flash.Expire();
return base.OnClick(state); return base.OnClick(e);
} }
private class BouncingIcon : BeatSyncedContainer private class BouncingIcon : BeatSyncedContainer

View File

@ -10,7 +10,7 @@ using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Shapes;
using osu.Framework.Input.States; using osu.Framework.Input.Events;
using osu.Game.Beatmaps; using osu.Game.Beatmaps;
using osu.Game.Beatmaps.Drawables; using osu.Game.Beatmaps.Drawables;
using osu.Game.Graphics; using osu.Game.Graphics;
@ -174,9 +174,9 @@ namespace osu.Game.Overlays.BeatmapSet
{ {
public Action OnLostHover; public Action OnLostHover;
protected override void OnHoverLost(InputState state) protected override void OnHoverLost(HoverLostEvent e)
{ {
base.OnHoverLost(state); base.OnHoverLost(e);
OnLostHover?.Invoke(); OnLostHover?.Invoke();
} }
} }
@ -241,24 +241,24 @@ namespace osu.Game.Overlays.BeatmapSet
}; };
} }
protected override bool OnHover(InputState state) protected override bool OnHover(HoverEvent e)
{ {
fadeIn(); fadeIn();
OnHovered?.Invoke(Beatmap); OnHovered?.Invoke(Beatmap);
return base.OnHover(state); return base.OnHover(e);
} }
protected override void OnHoverLost(InputState state) protected override void OnHoverLost(HoverLostEvent e)
{ {
if (State == DifficultySelectorState.NotSelected) if (State == DifficultySelectorState.NotSelected)
fadeOut(); fadeOut();
base.OnHoverLost(state); base.OnHoverLost(e);
} }
protected override bool OnClick(InputState state) protected override bool OnClick(ClickEvent e)
{ {
OnClicked?.Invoke(Beatmap); OnClicked?.Invoke(Beatmap);
return base.OnClick(state); return base.OnClick(e);
} }
private void fadeIn() private void fadeIn()

View File

@ -7,7 +7,7 @@ using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Shapes;
using osu.Framework.Input.States; using osu.Framework.Input.Events;
using osu.Game.Audio; using osu.Game.Audio;
using osu.Game.Beatmaps; using osu.Game.Beatmaps;
using osu.Game.Graphics; using osu.Game.Graphics;
@ -89,16 +89,16 @@ namespace osu.Game.Overlays.BeatmapSet.Buttons
progress.Width = 0; progress.Width = 0;
} }
protected override bool OnHover(InputState state) protected override bool OnHover(HoverEvent e)
{ {
bg.FadeColour(Color4.Black.Opacity(0.5f), 100); bg.FadeColour(Color4.Black.Opacity(0.5f), 100);
return base.OnHover(state); return base.OnHover(e);
} }
protected override void OnHoverLost(InputState state) protected override void OnHoverLost(HoverLostEvent e)
{ {
bg.FadeColour(Color4.Black.Opacity(0.25f), 100); bg.FadeColour(Color4.Black.Opacity(0.25f), 100);
base.OnHoverLost(state); base.OnHoverLost(e);
} }
} }
} }

View File

@ -3,7 +3,7 @@
using osu.Framework.Allocation; using osu.Framework.Allocation;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Input.States; using osu.Framework.Input.Events;
using osu.Game.Graphics.Containers; using osu.Game.Graphics.Containers;
using osu.Game.Graphics.Sprites; using osu.Game.Graphics.Sprites;
using osu.Game.Users; using osu.Game.Users;
@ -53,7 +53,7 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
this.profile = profile; this.profile = profile;
} }
protected override bool OnClick(InputState state) protected override bool OnClick(ClickEvent e)
{ {
profile?.ShowUser(user); profile?.ShowUser(user);
return true; return true;

View File

@ -6,7 +6,7 @@ using osu.Framework.Allocation;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Shapes;
using osu.Framework.Input.States; using osu.Framework.Input.Events;
using osu.Game.Graphics; using osu.Game.Graphics;
using osu.Game.Graphics.Sprites; using osu.Game.Graphics.Sprites;
using osu.Game.Online.API.Requests.Responses; using osu.Game.Online.API.Requests.Responses;
@ -125,18 +125,18 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
background.Colour = colours.Gray4; background.Colour = colours.Gray4;
} }
protected override bool OnHover(InputState state) protected override bool OnHover(HoverEvent e)
{ {
background.FadeIn(fade_duration, Easing.OutQuint); background.FadeIn(fade_duration, Easing.OutQuint);
return base.OnHover(state); return base.OnHover(e);
} }
protected override void OnHoverLost(InputState state) protected override void OnHoverLost(HoverLostEvent e)
{ {
background.FadeOut(fade_duration, Easing.OutQuint); background.FadeOut(fade_duration, Easing.OutQuint);
base.OnHoverLost(state); base.OnHoverLost(e);
} }
protected override bool OnClick(InputState state) => true; protected override bool OnClick(ClickEvent e) => true;
} }
} }

View File

@ -8,7 +8,7 @@ using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Shapes;
using osu.Framework.Input.States; using osu.Framework.Input.Events;
using osu.Game.Graphics; using osu.Game.Graphics;
using osu.Game.Graphics.Sprites; using osu.Game.Graphics.Sprites;
using osu.Game.Online.API.Requests.Responses; using osu.Game.Online.API.Requests.Responses;
@ -184,16 +184,16 @@ namespace osu.Game.Overlays.BeatmapSet.Scores
BorderColour = rankText.Colour = colours.Yellow; BorderColour = rankText.Colour = colours.Yellow;
} }
protected override bool OnHover(InputState state) protected override bool OnHover(HoverEvent e)
{ {
background.FadeIn(fade_duration, Easing.OutQuint); background.FadeIn(fade_duration, Easing.OutQuint);
return base.OnHover(state); return base.OnHover(e);
} }
protected override void OnHoverLost(InputState state) protected override void OnHoverLost(HoverLostEvent e)
{ {
background.FadeOut(fade_duration, Easing.OutQuint); background.FadeOut(fade_duration, Easing.OutQuint);
base.OnHoverLost(state); base.OnHoverLost(e);
} }
private class InfoColumn : FillFlowContainer private class InfoColumn : FillFlowContainer

View File

@ -7,7 +7,7 @@ using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Shapes;
using osu.Framework.Input.States; using osu.Framework.Input.Events;
using osu.Game.Beatmaps; using osu.Game.Beatmaps;
using osu.Game.Graphics; using osu.Game.Graphics;
using osu.Game.Graphics.Containers; using osu.Game.Graphics.Containers;
@ -127,7 +127,7 @@ namespace osu.Game.Overlays
FadeEdgeEffectTo(0, WaveContainer.DISAPPEAR_DURATION, Easing.Out).OnComplete(_ => BeatmapSet = null); FadeEdgeEffectTo(0, WaveContainer.DISAPPEAR_DURATION, Easing.Out).OnComplete(_ => BeatmapSet = null);
} }
protected override bool OnClick(InputState state) protected override bool OnClick(ClickEvent e)
{ {
State = Visibility.Hidden; State = Visibility.Hidden;
return true; return true;

View File

@ -9,7 +9,7 @@ using osu.Framework.Allocation;
using osu.Framework.Configuration; using osu.Framework.Configuration;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Input.States; using osu.Framework.Input.Events;
using osu.Game.Graphics; using osu.Game.Graphics;
using osu.Game.Graphics.Sprites; using osu.Game.Graphics.Sprites;
using osu.Game.Online.Chat; using osu.Game.Online.Chat;
@ -155,15 +155,15 @@ namespace osu.Game.Overlays.Chat
FinishTransforms(true); FinishTransforms(true);
} }
protected override bool OnHover(InputState state) protected override bool OnHover(HoverEvent e)
{ {
if (!channel.Joined.Value) if (!channel.Joined.Value)
name.FadeColour(hoverColour, 50, Easing.OutQuint); name.FadeColour(hoverColour, 50, Easing.OutQuint);
return base.OnHover(state); return base.OnHover(e);
} }
protected override void OnHoverLost(InputState state) protected override void OnHoverLost(HoverLostEvent e)
{ {
if (!channel.Joined.Value) if (!channel.Joined.Value)
name.FadeColour(Color4.White, transition_duration); name.FadeColour(Color4.White, transition_duration);

View File

@ -10,7 +10,7 @@ using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Shapes;
using osu.Framework.Input.States; using osu.Framework.Input.Events;
using osu.Game.Graphics; using osu.Game.Graphics;
using osu.Game.Graphics.Backgrounds; using osu.Game.Graphics.Backgrounds;
using osu.Game.Graphics.Sprites; using osu.Game.Graphics.Sprites;
@ -150,10 +150,10 @@ namespace osu.Game.Overlays.Chat
headerBg.Colour = colours.Gray2.Opacity(0.75f); headerBg.Colour = colours.Gray2.Opacity(0.75f);
} }
protected override void OnFocus(InputState state) protected override void OnFocus(FocusEvent e)
{ {
GetContainingInputManager().ChangeFocus(search); GetContainingInputManager().ChangeFocus(search);
base.OnFocus(state); base.OnFocus(e);
} }
protected override void PopIn() protected override void PopIn()

View File

@ -17,8 +17,7 @@ using OpenTK.Input;
using OpenTK.Graphics; using OpenTK.Graphics;
using osu.Framework.Configuration; using osu.Framework.Configuration;
using System; using System;
using osu.Framework.Input.EventArgs; using osu.Framework.Input.Events;
using osu.Framework.Input.States;
using osu.Game.Graphics.Containers; using osu.Game.Graphics.Containers;
namespace osu.Game.Overlays.Chat namespace osu.Game.Overlays.Chat
@ -144,9 +143,9 @@ namespace osu.Game.Overlays.Chat
textBold.FadeOut(transition_length, Easing.OutQuint); textBold.FadeOut(transition_length, Easing.OutQuint);
} }
protected override bool OnMouseUp(InputState state, MouseUpEventArgs args) protected override bool OnMouseUp(MouseUpEvent e)
{ {
if (args.Button == MouseButton.Middle) if (e.Button == MouseButton.Middle)
{ {
closeButton.Action(); closeButton.Action();
return true; return true;
@ -155,7 +154,7 @@ namespace osu.Game.Overlays.Chat
return false; return false;
} }
protected override bool OnHover(InputState state) protected override bool OnHover(HoverEvent e)
{ {
if (IsRemovable) if (IsRemovable)
closeButton.FadeIn(200, Easing.OutQuint); closeButton.FadeIn(200, Easing.OutQuint);
@ -165,7 +164,7 @@ namespace osu.Game.Overlays.Chat
return true; return true;
} }
protected override void OnHoverLost(InputState state) protected override void OnHoverLost(HoverLostEvent e)
{ {
closeButton.FadeOut(200, Easing.OutQuint); closeButton.FadeOut(200, Easing.OutQuint);
updateState(); updateState();
@ -291,28 +290,28 @@ namespace osu.Game.Overlays.Chat
}; };
} }
protected override bool OnMouseDown(InputState state, MouseDownEventArgs args) protected override bool OnMouseDown(MouseDownEvent e)
{ {
icon.ScaleTo(0.5f, 1000, Easing.OutQuint); icon.ScaleTo(0.5f, 1000, 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)
{ {
icon.ScaleTo(0.75f, 1000, Easing.OutElastic); icon.ScaleTo(0.75f, 1000, Easing.OutElastic);
return base.OnMouseUp(state, args); return base.OnMouseUp(e);
} }
protected override bool OnHover(InputState state) protected override bool OnHover(HoverEvent e)
{ {
icon.FadeColour(Color4.Red, 200, Easing.OutQuint); icon.FadeColour(Color4.Red, 200, Easing.OutQuint);
return base.OnHover(state); return base.OnHover(e);
} }
protected override void OnHoverLost(InputState state) protected override void OnHoverLost(HoverLostEvent e)
{ {
icon.FadeColour(Color4.White, 200, Easing.OutQuint); icon.FadeColour(Color4.White, 200, Easing.OutQuint);
base.OnHoverLost(state); base.OnHoverLost(e);
} }
} }

View File

@ -13,7 +13,7 @@ using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Shapes;
using osu.Framework.Graphics.UserInterface; using osu.Framework.Graphics.UserInterface;
using osu.Framework.Input.States; using osu.Framework.Input.Events;
using osu.Framework.Threading; using osu.Framework.Threading;
using osu.Game.Configuration; using osu.Game.Configuration;
using osu.Game.Graphics; using osu.Game.Graphics;
@ -191,25 +191,25 @@ namespace osu.Game.Overlays
public void OpenChannel(Channel channel) => addChannel(channel); public void OpenChannel(Channel channel) => addChannel(channel);
protected override bool OnDragStart(InputState state) protected override bool OnDragStart(DragStartEvent e)
{ {
isDragging = tabsArea.IsHovered; isDragging = tabsArea.IsHovered;
if (!isDragging) if (!isDragging)
return base.OnDragStart(state); return base.OnDragStart(e);
startDragChatHeight = ChatHeight.Value; startDragChatHeight = ChatHeight.Value;
return true; return true;
} }
protected override bool OnDrag(InputState state) protected override bool OnDrag(DragEvent e)
{ {
if (isDragging) if (isDragging)
{ {
Trace.Assert(state.Mouse.PositionMouseDown != null); Trace.Assert(e.Mouse.PositionMouseDown != null);
// ReSharper disable once PossibleInvalidOperationException // ReSharper disable once PossibleInvalidOperationException
double targetChatHeight = startDragChatHeight - (state.Mouse.Position.Y - state.Mouse.PositionMouseDown.Value.Y) / Parent.DrawSize.Y; double targetChatHeight = startDragChatHeight - (e.Mouse.Position.Y - e.Mouse.PositionMouseDown.Value.Y) / Parent.DrawSize.Y;
// If the channel selection screen is shown, mind its minimum height // If the channel selection screen is shown, mind its minimum height
if (channelSelection.State == Visibility.Visible && targetChatHeight > 1f - channel_selection_min_height) if (channelSelection.State == Visibility.Visible && targetChatHeight > 1f - channel_selection_min_height)
@ -221,10 +221,10 @@ namespace osu.Game.Overlays
return true; return true;
} }
protected override bool OnDragEnd(InputState state) protected override bool OnDragEnd(DragEndEvent e)
{ {
isDragging = false; isDragging = false;
return base.OnDragEnd(state); return base.OnDragEnd(e);
} }
public void APIStateChanged(APIAccess api, APIState state) public void APIStateChanged(APIAccess api, APIState state)
@ -242,11 +242,11 @@ namespace osu.Game.Overlays
public override bool AcceptsFocus => true; public override bool AcceptsFocus => true;
protected override void OnFocus(InputState state) protected override void OnFocus(FocusEvent e)
{ {
//this is necessary as textbox is masked away and therefore can't get focus :( //this is necessary as textbox is masked away and therefore can't get focus :(
GetContainingInputManager().ChangeFocus(textbox); GetContainingInputManager().ChangeFocus(textbox);
base.OnFocus(state); base.OnFocus(e);
} }
protected override void PopIn() protected override void PopIn()

View File

@ -8,8 +8,7 @@ using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Shapes;
using osu.Framework.Graphics.Sprites; using osu.Framework.Graphics.Sprites;
using osu.Framework.Input.EventArgs; using osu.Framework.Input.Events;
using osu.Framework.Input.States;
using osu.Game.Graphics; using osu.Game.Graphics;
using osu.Game.Graphics.Backgrounds; using osu.Game.Graphics.Backgrounds;
using osu.Game.Graphics.Containers; using osu.Game.Graphics.Containers;
@ -206,12 +205,12 @@ namespace osu.Game.Overlays.Dialog
return base.OnPressed(action); return base.OnPressed(action);
} }
protected override bool OnKeyDown(InputState state, KeyDownEventArgs args) protected override bool OnKeyDown(KeyDownEvent e)
{ {
if (args.Repeat) return false; if (e.Repeat) return false;
// press button at number if 1-9 on number row or keypad are pressed // press button at number if 1-9 on number row or keypad are pressed
var k = args.Key; var k = e.Key;
if (k >= Key.Number1 && k <= Key.Number9) if (k >= Key.Number1 && k <= Key.Number9)
{ {
pressButtonAtIndex(k - Key.Number1); pressButtonAtIndex(k - Key.Number1);
@ -224,7 +223,7 @@ namespace osu.Game.Overlays.Dialog
return true; return true;
} }
return base.OnKeyDown(state, args); return base.OnKeyDown(e);
} }
protected override void PopIn() protected override void PopIn()

View File

@ -227,15 +227,15 @@ namespace osu.Game.Overlays.Direct
PreviewPlaying.ValueChanged += _ => updateStatusContainer(); PreviewPlaying.ValueChanged += _ => updateStatusContainer();
} }
protected override bool OnHover(InputState state) protected override bool OnHover(HoverEvent e)
{ {
updateStatusContainer(); updateStatusContainer();
return base.OnHover(state); return base.OnHover(e);
} }
protected override void OnHoverLost(InputState state) protected override void OnHoverLost(HoverLostEvent e)
{ {
base.OnHoverLost(state); base.OnHoverLost(e);
updateStatusContainer(); updateStatusContainer();
} }

View File

@ -10,7 +10,7 @@ using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Shapes;
using osu.Framework.Graphics.Sprites; using osu.Framework.Graphics.Sprites;
using osu.Framework.Input.States; using osu.Framework.Input.Events;
using osu.Game.Audio; using osu.Game.Audio;
using osu.Game.Beatmaps; using osu.Game.Beatmaps;
using osu.Game.Beatmaps.Drawables; using osu.Game.Beatmaps.Drawables;
@ -121,27 +121,27 @@ namespace osu.Game.Overlays.Direct
} }
} }
protected override bool OnHover(InputState state) protected override bool OnHover(HoverEvent e)
{ {
content.TweenEdgeEffectTo(edgeEffectHovered, hover_transition_time, Easing.OutQuint); content.TweenEdgeEffectTo(edgeEffectHovered, hover_transition_time, Easing.OutQuint);
content.MoveToY(-4, hover_transition_time, Easing.OutQuint); content.MoveToY(-4, hover_transition_time, Easing.OutQuint);
if (FadePlayButton) if (FadePlayButton)
PlayButton.FadeIn(120, Easing.InOutQuint); PlayButton.FadeIn(120, Easing.InOutQuint);
return base.OnHover(state); return base.OnHover(e);
} }
protected override void OnHoverLost(InputState state) protected override void OnHoverLost(HoverLostEvent e)
{ {
content.TweenEdgeEffectTo(edgeEffectNormal, hover_transition_time, Easing.OutQuint); content.TweenEdgeEffectTo(edgeEffectNormal, hover_transition_time, Easing.OutQuint);
content.MoveToY(0, hover_transition_time, Easing.OutQuint); content.MoveToY(0, hover_transition_time, Easing.OutQuint);
if (FadePlayButton && !PreviewPlaying) if (FadePlayButton && !PreviewPlaying)
PlayButton.FadeOut(120, Easing.InOutQuint); PlayButton.FadeOut(120, Easing.InOutQuint);
base.OnHoverLost(state); base.OnHoverLost(e);
} }
protected override bool OnClick(InputState state) protected override bool OnClick(ClickEvent e)
{ {
ShowInformation(); ShowInformation();
return true; return true;

View File

@ -5,7 +5,7 @@ using osu.Framework.Allocation;
using osu.Framework.Configuration; using osu.Framework.Configuration;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Input.States; using osu.Framework.Input.Events;
using osu.Game.Audio; using osu.Game.Audio;
using osu.Game.Beatmaps; using osu.Game.Beatmaps;
using osu.Game.Graphics; using osu.Game.Graphics;
@ -93,23 +93,23 @@ namespace osu.Game.Overlays.Direct
hoverColour = colour.Yellow; hoverColour = colour.Yellow;
} }
protected override bool OnClick(InputState state) protected override bool OnClick(ClickEvent e)
{ {
Playing.Toggle(); Playing.Toggle();
return true; return true;
} }
protected override bool OnHover(InputState state) protected override bool OnHover(HoverEvent e)
{ {
icon.FadeColour(hoverColour, 120, Easing.InOutQuint); icon.FadeColour(hoverColour, 120, Easing.InOutQuint);
return base.OnHover(state); return base.OnHover(e);
} }
protected override void OnHoverLost(InputState state) protected override void OnHoverLost(HoverLostEvent e)
{ {
if (!Playing.Value) if (!Playing.Value)
icon.FadeColour(Color4.White, 120, Easing.InOutQuint); icon.FadeColour(Color4.White, 120, Easing.InOutQuint);
base.OnHoverLost(state); base.OnHoverLost(e);
} }
private void playingStateChanged(bool playing) private void playingStateChanged(bool playing)

View File

@ -10,7 +10,7 @@ using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Shapes;
using osu.Framework.Input.Bindings; using osu.Framework.Input.Bindings;
using osu.Framework.Input.EventArgs; using osu.Framework.Input.Events;
using osu.Framework.Input.States; using osu.Framework.Input.States;
using osu.Game.Graphics; using osu.Game.Graphics;
using osu.Game.Graphics.Containers; using osu.Game.Graphics.Containers;
@ -125,18 +125,18 @@ namespace osu.Game.Overlays.KeyBinding
} }
} }
protected override bool OnHover(InputState state) protected override bool OnHover(HoverEvent e)
{ {
FadeEdgeEffectTo(1, transition_time, Easing.OutQuint); FadeEdgeEffectTo(1, transition_time, Easing.OutQuint);
return base.OnHover(state); return base.OnHover(e);
} }
protected override void OnHoverLost(InputState state) protected override void OnHoverLost(HoverLostEvent e)
{ {
FadeEdgeEffectTo(0, transition_time, Easing.OutQuint); FadeEdgeEffectTo(0, transition_time, Easing.OutQuint);
base.OnHoverLost(state); base.OnHoverLost(e);
} }
public override bool AcceptsFocus => bindTarget == null; public override bool AcceptsFocus => bindTarget == null;
@ -149,16 +149,16 @@ namespace osu.Game.Overlays.KeyBinding
private bool isModifier(Key k) => k < Key.F1; private bool isModifier(Key k) => k < Key.F1;
protected override bool OnClick(InputState state) => true; protected override bool OnClick(ClickEvent e) => true;
protected override bool OnMouseDown(InputState state, MouseDownEventArgs args) protected override bool OnMouseDown(MouseDownEvent e)
{ {
if (!HasFocus || !bindTarget.IsHovered) if (!HasFocus || !bindTarget.IsHovered)
return base.OnMouseDown(state, args); return base.OnMouseDown(e);
if (!AllowMainMouseButtons) if (!AllowMainMouseButtons)
{ {
switch (args.Button) switch (e.Button)
{ {
case MouseButton.Left: case MouseButton.Left:
case MouseButton.Right: case MouseButton.Right:
@ -170,11 +170,11 @@ namespace osu.Game.Overlays.KeyBinding
return true; return true;
} }
protected override bool OnMouseUp(InputState state, MouseUpEventArgs args) protected override bool OnMouseUp(MouseUpEvent e)
{ {
// don't do anything until the last button is released. // don't do anything until the last button is released.
if (!HasFocus || state.Mouse.Buttons.Any()) if (!HasFocus || state.Mouse.Buttons.Any())
return base.OnMouseUp(state, args); return base.OnMouseUp(e);
if (bindTarget.IsHovered) if (bindTarget.IsHovered)
finalise(); finalise();
@ -183,27 +183,27 @@ namespace osu.Game.Overlays.KeyBinding
return true; return true;
} }
protected override bool OnScroll(InputState state) protected override bool OnScroll(ScrollEvent e)
{ {
if (HasFocus) if (HasFocus)
{ {
if (bindTarget.IsHovered) if (bindTarget.IsHovered)
{ {
bindTarget.UpdateKeyCombination(KeyCombination.FromInputState(state, state.Mouse.ScrollDelta)); bindTarget.UpdateKeyCombination(KeyCombination.FromInputState(e, e.Mouse.ScrollDelta));
finalise(); finalise();
return true; return true;
} }
} }
return base.OnScroll(state); return base.OnScroll(e);
} }
protected override bool OnKeyDown(InputState state, KeyDownEventArgs args) protected override bool OnKeyDown(KeyDownEvent e)
{ {
if (!HasFocus) if (!HasFocus)
return false; return false;
switch (args.Key) switch (e.Key)
{ {
case Key.Delete: case Key.Delete:
{ {
@ -219,14 +219,14 @@ namespace osu.Game.Overlays.KeyBinding
} }
bindTarget.UpdateKeyCombination(KeyCombination.FromInputState(state)); bindTarget.UpdateKeyCombination(KeyCombination.FromInputState(state));
if (!isModifier(args.Key)) finalise(); if (!isModifier(e.Key)) finalise();
return true; return true;
} }
protected override bool OnKeyUp(InputState state, KeyUpEventArgs args) protected override bool OnKeyUp(KeyUpEvent e)
{ {
if (!HasFocus) return base.OnKeyUp(state, args); if (!HasFocus) return base.OnKeyUp(e);
finalise(); finalise();
return true; return true;
@ -246,7 +246,7 @@ namespace osu.Game.Overlays.KeyBinding
protected override bool OnJoystickRelease(InputState state, JoystickEventArgs args) protected override bool OnJoystickRelease(InputState state, JoystickEventArgs args)
{ {
if (!HasFocus) if (!HasFocus)
return base.OnJoystickRelease(state, args); return base.OnJoystickRelease(args);
finalise(); finalise();
return true; return true;
@ -273,7 +273,7 @@ namespace osu.Game.Overlays.KeyBinding
pressAKey.BypassAutoSizeAxes |= Axes.Y; pressAKey.BypassAutoSizeAxes |= Axes.Y;
} }
protected override void OnFocus(InputState state) protected override void OnFocus(FocusEvent e)
{ {
AutoSizeDuration = 500; AutoSizeDuration = 500;
AutoSizeEasing = Easing.OutQuint; AutoSizeEasing = Easing.OutQuint;
@ -282,13 +282,13 @@ namespace osu.Game.Overlays.KeyBinding
pressAKey.BypassAutoSizeAxes &= ~Axes.Y; pressAKey.BypassAutoSizeAxes &= ~Axes.Y;
updateBindTarget(); updateBindTarget();
base.OnFocus(state); base.OnFocus(e);
} }
protected override void OnFocusLost(InputState state) protected override void OnFocusLost(FocusLostEvent e)
{ {
finalise(); finalise();
base.OnFocusLost(state); base.OnFocusLost(e);
} }
private void updateBindTarget() private void updateBindTarget()
@ -367,16 +367,16 @@ namespace osu.Game.Overlays.KeyBinding
hoverColour = colours.YellowDark; hoverColour = colours.YellowDark;
} }
protected override bool OnHover(InputState state) protected override bool OnHover(HoverEvent e)
{ {
updateHoverState(); updateHoverState();
return base.OnHover(state); return base.OnHover(e);
} }
protected override void OnHoverLost(InputState state) protected override void OnHoverLost(HoverLostEvent e)
{ {
updateHoverState(); updateHoverState();
base.OnHoverLost(state); base.OnHoverLost(e);
} }
private void updateHoverState() private void updateHoverState()

View File

@ -6,8 +6,7 @@ using osu.Framework.Allocation;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Input.Bindings; using osu.Framework.Input.Bindings;
using osu.Framework.Input.EventArgs; using osu.Framework.Input.Events;
using osu.Framework.Input.States;
using osu.Game.Graphics; using osu.Game.Graphics;
using osu.Game.Graphics.Containers; using osu.Game.Graphics.Containers;
using osu.Game.Graphics.Sprites; using osu.Game.Graphics.Sprites;
@ -138,16 +137,16 @@ namespace osu.Game.Overlays
}; };
} }
protected override bool OnMouseDown(InputState state, MouseDownEventArgs args) protected override bool OnMouseDown(MouseDownEvent e)
{ {
aspect.ScaleTo(0.75f, 2000, Easing.OutQuint); 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); aspect.ScaleTo(1, 1000, Easing.OutElastic);
return base.OnMouseUp(state, args); return base.OnMouseUp(e);
} }
public bool OnPressed(GlobalAction action) public bool OnPressed(GlobalAction action)

View File

@ -19,8 +19,7 @@ using osu.Framework.Graphics.Textures;
using OpenTK.Input; using OpenTK.Input;
using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Shapes;
using System; using System;
using System.Linq; using osu.Framework.Input.Events;
using osu.Framework.Input.States;
using osu.Framework.MathUtils; using osu.Framework.MathUtils;
namespace osu.Game.Overlays namespace osu.Game.Overlays
@ -176,15 +175,15 @@ namespace osu.Game.Overlays
particleContainer.Add(new MedalParticle(RNG.Next(0, 359))); particleContainer.Add(new MedalParticle(RNG.Next(0, 359)));
} }
protected override bool OnClick(InputState state) protected override bool OnClick(ClickEvent e)
{ {
dismiss(); dismiss();
return true; return true;
} }
protected override void OnFocusLost(InputState state) protected override void OnFocusLost(FocusLostEvent e)
{ {
if (state.Keyboard.Keys.Contains(Key.Escape)) dismiss(); if (e.Keyboard.Keys.Contains(Key.Escape)) dismiss();
} }
private const double initial_duration = 400; private const double initial_duration = 400;

View File

@ -13,8 +13,7 @@ using osu.Game.Rulesets.UI;
using System; using System;
using System.Linq; using System.Linq;
using osu.Framework.Graphics.Cursor; using osu.Framework.Graphics.Cursor;
using osu.Framework.Input.EventArgs; using osu.Framework.Input.Events;
using osu.Framework.Input.States;
using osu.Game.Graphics.UserInterface; using osu.Game.Graphics.UserInterface;
namespace osu.Game.Overlays.Mods namespace osu.Game.Overlays.Mods
@ -149,20 +148,20 @@ namespace osu.Game.Overlays.Mods
public virtual Mod SelectedMod => Mods.ElementAtOrDefault(selectedIndex); public virtual Mod SelectedMod => Mods.ElementAtOrDefault(selectedIndex);
protected override bool OnMouseDown(InputState state, MouseDownEventArgs args) protected override bool OnMouseDown(MouseDownEvent e)
{ {
scaleContainer.ScaleTo(0.9f, 800, Easing.Out); scaleContainer.ScaleTo(0.9f, 800, Easing.Out);
return base.OnMouseDown(state, args); return base.OnMouseDown(e);
} }
protected override bool OnMouseUp(InputState state, MouseUpEventArgs args) protected override bool OnMouseUp(MouseUpEvent e)
{ {
scaleContainer.ScaleTo(1, 500, Easing.OutElastic); scaleContainer.ScaleTo(1, 500, Easing.OutElastic);
// only trigger the event if we are inside the area of the button // only trigger the event if we are inside the area of the button
if (Contains(ToScreenSpace(state.Mouse.Position - Position))) if (Contains(ToScreenSpace(state.Mouse.Position - Position)))
{ {
switch (args.Button) switch (e.Button)
{ {
case MouseButton.Left: case MouseButton.Left:
SelectNext(1); SelectNext(1);

View File

@ -10,8 +10,7 @@ using osu.Game.Rulesets.Mods;
using System; using System;
using System.Linq; using System.Linq;
using System.Collections.Generic; using System.Collections.Generic;
using osu.Framework.Input.EventArgs; using osu.Framework.Input.Events;
using osu.Framework.Input.States;
namespace osu.Game.Overlays.Mods namespace osu.Game.Overlays.Mods
{ {
@ -55,16 +54,16 @@ namespace osu.Game.Overlays.Mods
private ModButton[] buttons = { }; private ModButton[] buttons = { };
protected override bool OnKeyDown(InputState state, KeyDownEventArgs args) protected override bool OnKeyDown(KeyDownEvent e)
{ {
if (ToggleKeys != null) if (ToggleKeys != null)
{ {
var index = Array.IndexOf(ToggleKeys, args.Key); var index = Array.IndexOf(ToggleKeys, e.Key);
if (index > -1 && index < buttons.Length) if (index > -1 && index < buttons.Length)
buttons[index].SelectNext(state.Keyboard.ShiftPressed ? -1 : 1); buttons[index].SelectNext(state.Keyboard.ShiftPressed ? -1 : 1);
} }
return base.OnKeyDown(state, args); return base.OnKeyDown(e);
} }
public void DeselectAll() => DeselectTypes(buttons.Select(b => b.SelectedMod?.GetType()).Where(t => t != null)); public void DeselectAll() => DeselectTypes(buttons.Select(b => b.SelectedMod?.GetType()).Where(t => t != null));

View File

@ -8,8 +8,7 @@ using osu.Framework.Allocation;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Sprites; using osu.Framework.Graphics.Sprites;
using osu.Framework.Input.EventArgs; using osu.Framework.Input.Events;
using osu.Framework.Input.States;
using osu.Framework.Localisation; using osu.Framework.Localisation;
using osu.Game.Beatmaps; using osu.Game.Beatmaps;
using osu.Game.Graphics; using osu.Game.Graphics;
@ -37,16 +36,16 @@ namespace osu.Game.Overlays.Music
public bool IsDraggable { get; private set; } public bool IsDraggable { get; private set; }
protected override bool OnMouseDown(InputState state, MouseDownEventArgs args) protected override bool OnMouseDown(MouseDownEvent e)
{ {
IsDraggable = handle.IsHovered; IsDraggable = handle.IsHovered;
return base.OnMouseDown(state, args); return base.OnMouseDown(e);
} }
protected override bool OnMouseUp(InputState state, MouseUpEventArgs args) protected override bool OnMouseUp(MouseUpEvent e)
{ {
IsDraggable = false; IsDraggable = false;
return base.OnMouseUp(state, args); return base.OnMouseUp(e);
} }
private bool selected; private bool selected;
@ -123,19 +122,19 @@ namespace osu.Game.Overlays.Music
}); });
} }
protected override bool OnHover(InputState state) protected override bool OnHover(HoverEvent e)
{ {
handle.FadeIn(fade_duration); handle.FadeIn(fade_duration);
return base.OnHover(state); return base.OnHover(e);
} }
protected override void OnHoverLost(InputState state) protected override void OnHoverLost(HoverLostEvent e)
{ {
handle.FadeOut(fade_duration); handle.FadeOut(fade_duration);
} }
protected override bool OnClick(InputState state) protected override bool OnClick(ClickEvent e)
{ {
OnSelect?.Invoke(BeatmapSetInfo); OnSelect?.Invoke(BeatmapSetInfo);
return true; return true;

View File

@ -8,7 +8,7 @@ using osu.Framework.Allocation;
using osu.Framework.Configuration; using osu.Framework.Configuration;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Input.States; using osu.Framework.Input.Events;
using osu.Game.Beatmaps; using osu.Game.Beatmaps;
using osu.Game.Graphics.Containers; using osu.Game.Graphics.Containers;
using OpenTK; using OpenTK;
@ -115,25 +115,25 @@ namespace osu.Game.Overlays.Music
private Vector2 nativeDragPosition; private Vector2 nativeDragPosition;
private PlaylistItem draggedItem; private PlaylistItem draggedItem;
protected override bool OnDragStart(InputState state) protected override bool OnDragStart(DragStartEvent e)
{ {
nativeDragPosition = state.Mouse.NativeState.Position; nativeDragPosition = e.Mouse.NativeState.Position;
draggedItem = items.FirstOrDefault(d => d.IsDraggable); draggedItem = items.FirstOrDefault(d => d.IsDraggable);
return draggedItem != null || base.OnDragStart(state); return draggedItem != null || base.OnDragStart(e);
} }
protected override bool OnDrag(InputState state) protected override bool OnDrag(DragEvent e)
{ {
nativeDragPosition = state.Mouse.NativeState.Position; nativeDragPosition = e.Mouse.NativeState.Position;
if (draggedItem == null) if (draggedItem == null)
return base.OnDrag(state); return base.OnDrag(e);
return true; return true;
} }
protected override bool OnDragEnd(InputState state) protected override bool OnDragEnd(DragEndEvent e)
{ {
nativeDragPosition = state.Mouse.NativeState.Position; nativeDragPosition = e.Mouse.NativeState.Position;
var handled = draggedItem != null || base.OnDragEnd(state); var handled = draggedItem != null || base.OnDragEnd(e);
draggedItem = null; draggedItem = null;
return handled; return handled;

View File

@ -13,7 +13,7 @@ using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Shapes;
using osu.Framework.Graphics.Sprites; using osu.Framework.Graphics.Sprites;
using osu.Framework.Graphics.Textures; using osu.Framework.Graphics.Textures;
using osu.Framework.Input.States; using osu.Framework.Input.Events;
using osu.Framework.Localisation; using osu.Framework.Localisation;
using osu.Framework.Threading; using osu.Framework.Threading;
using osu.Game.Beatmaps; using osu.Game.Beatmaps;
@ -459,18 +459,18 @@ namespace osu.Game.Overlays
{ {
private Vector2 dragStart; private Vector2 dragStart;
protected override bool OnDragStart(InputState state) protected override bool OnDragStart(DragStartEvent e)
{ {
base.OnDragStart(state); base.OnDragStart(e);
dragStart = state.Mouse.Position; dragStart = e.Mouse.Position;
return true; return true;
} }
protected override bool OnDrag(InputState state) protected override bool OnDrag(DragEvent e)
{ {
if (base.OnDrag(state)) return true; if (base.OnDrag(e)) return true;
Vector2 change = state.Mouse.Position - dragStart; Vector2 change = e.Mouse.Position - dragStart;
// Diminish the drag distance as we go further to simulate "rubber band" feeling. // Diminish the drag distance as we go further to simulate "rubber band" feeling.
change *= change.Length <= 0 ? 0 : (float)Math.Pow(change.Length, 0.7f) / change.Length; change *= change.Length <= 0 ? 0 : (float)Math.Pow(change.Length, 0.7f) / change.Length;
@ -479,10 +479,10 @@ namespace osu.Game.Overlays
return true; return true;
} }
protected override bool OnDragEnd(InputState state) protected override bool OnDragEnd(DragEndEvent e)
{ {
this.MoveTo(Vector2.Zero, 800, Easing.OutElastic); this.MoveTo(Vector2.Zero, 800, Easing.OutElastic);
return base.OnDragEnd(state); return base.OnDragEnd(e);
} }
} }
} }

View File

@ -11,7 +11,7 @@ using osu.Game.Graphics;
using OpenTK; using OpenTK;
using OpenTK.Graphics; using OpenTK.Graphics;
using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Shapes;
using osu.Framework.Input.States; using osu.Framework.Input.Events;
using osu.Game.Graphics.Containers; using osu.Game.Graphics.Containers;
namespace osu.Game.Overlays.Notifications namespace osu.Game.Overlays.Notifications
@ -118,19 +118,19 @@ namespace osu.Game.Overlays.Notifications
}); });
} }
protected override bool OnHover(InputState state) protected override bool OnHover(HoverEvent e)
{ {
closeButton.FadeIn(75); closeButton.FadeIn(75);
return base.OnHover(state); return base.OnHover(e);
} }
protected override void OnHoverLost(InputState state) protected override void OnHoverLost(HoverLostEvent e)
{ {
closeButton.FadeOut(75); closeButton.FadeOut(75);
base.OnHoverLost(state); base.OnHoverLost(e);
} }
protected override bool OnClick(InputState state) protected override bool OnClick(ClickEvent e)
{ {
if (Activated?.Invoke() ?? true) if (Activated?.Invoke() ?? true)
Close(); Close();
@ -185,16 +185,16 @@ namespace osu.Game.Overlays.Notifications
hoverColour = colours.Yellow; hoverColour = colours.Yellow;
} }
protected override bool OnHover(InputState state) protected override bool OnHover(HoverEvent e)
{ {
this.FadeColour(hoverColour, 200); this.FadeColour(hoverColour, 200);
return base.OnHover(state); return base.OnHover(e);
} }
protected override void OnHoverLost(InputState state) protected override void OnHoverLost(HoverLostEvent e)
{ {
this.FadeColour(OsuColour.Gray(0.2f), 200); this.FadeColour(OsuColour.Gray(0.2f), 200);
base.OnHoverLost(state); base.OnHoverLost(e);
} }
} }

View File

@ -9,7 +9,7 @@ using osu.Framework.Graphics.Cursor;
using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Shapes;
using osu.Framework.Graphics.Sprites; using osu.Framework.Graphics.Sprites;
using osu.Framework.Graphics.Textures; using osu.Framework.Graphics.Textures;
using osu.Framework.Input.States; using osu.Framework.Input.Events;
using osu.Game.Graphics; using osu.Game.Graphics;
using osu.Game.Graphics.Sprites; using osu.Game.Graphics.Sprites;
using osu.Game.Users; using osu.Game.Users;
@ -153,13 +153,13 @@ namespace osu.Game.Overlays.Profile.Header
this.hoverLostAction = hoverLostAction; this.hoverLostAction = hoverLostAction;
} }
protected override bool OnHover(InputState state) protected override bool OnHover(HoverEvent e)
{ {
hoverAction(); hoverAction();
return true; return true;
} }
protected override void OnHoverLost(InputState state) => hoverLostAction(); protected override void OnHoverLost(HoverLostEvent e) => hoverLostAction();
} }
private class DrawableBadge : Container, IHasTooltip private class DrawableBadge : Container, IHasTooltip

View File

@ -10,7 +10,7 @@ using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Shapes;
using osu.Framework.Graphics.Sprites; using osu.Framework.Graphics.Sprites;
using osu.Framework.Input.States; using osu.Framework.Input.Events;
using osu.Game.Graphics; using osu.Game.Graphics;
using osu.Game.Graphics.Sprites; using osu.Game.Graphics.Sprites;
using osu.Game.Graphics.UserInterface; using osu.Game.Graphics.UserInterface;
@ -137,25 +137,25 @@ namespace osu.Game.Overlays.Profile.Header
relativeText.Text = dayIndex + 1 == ranks.Length ? "Now" : $"{ranked_days - ranks[dayIndex].Key} days ago"; relativeText.Text = dayIndex + 1 == ranks.Length ? "Now" : $"{ranked_days - ranks[dayIndex].Key} days ago";
} }
protected override bool OnHover(InputState state) protected override bool OnHover(HoverEvent e)
{ {
if (ranks?.Length > 1) if (ranks?.Length > 1)
{ {
graph.UpdateBallPosition(state.Mouse.Position.X); graph.UpdateBallPosition(e.Mouse.Position.X);
graph.ShowBall(); graph.ShowBall();
} }
return base.OnHover(state); return base.OnHover(e);
} }
protected override bool OnMouseMove(InputState state) protected override bool OnMouseMove(MouseMoveEvent e)
{ {
if (ranks?.Length > 1) if (ranks?.Length > 1)
graph.UpdateBallPosition(state.Mouse.Position.X); graph.UpdateBallPosition(e.Mouse.Position.X);
return base.OnMouseMove(state); return base.OnMouseMove(e);
} }
protected override void OnHoverLost(InputState state) protected override void OnHoverLost(HoverLostEvent e)
{ {
if (ranks?.Length > 1) if (ranks?.Length > 1)
{ {
@ -163,7 +163,7 @@ namespace osu.Game.Overlays.Profile.Header
updateRankTexts(); updateRankTexts();
} }
base.OnHoverLost(state); base.OnHoverLost(e);
} }
private class RankChartLineGraph : LineGraph private class RankChartLineGraph : LineGraph

View File

@ -6,7 +6,7 @@ using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Shapes;
using osu.Framework.Input.States; using osu.Framework.Input.Events;
using osu.Game.Graphics; using osu.Game.Graphics;
using OpenTK; using OpenTK;
using OpenTK.Graphics; using OpenTK.Graphics;
@ -105,20 +105,20 @@ namespace osu.Game.Overlays.Profile.Sections
coloredBackground.Colour = underscoreLine.Colour = colour.Gray4; coloredBackground.Colour = underscoreLine.Colour = colour.Gray4;
} }
protected override bool OnClick(InputState state) => true; protected override bool OnClick(ClickEvent e) => true;
protected override bool OnHover(InputState state) protected override bool OnHover(HoverEvent e)
{ {
background.FadeIn(fade_duration, Easing.OutQuint); background.FadeIn(fade_duration, Easing.OutQuint);
underscoreLine.FadeOut(fade_duration, Easing.OutQuint); underscoreLine.FadeOut(fade_duration, Easing.OutQuint);
return true; return true;
} }
protected override void OnHoverLost(InputState state) protected override void OnHoverLost(HoverLostEvent e)
{ {
background.FadeOut(fade_duration, Easing.OutQuint); background.FadeOut(fade_duration, Easing.OutQuint);
underscoreLine.FadeIn(fade_duration, Easing.OutQuint); underscoreLine.FadeIn(fade_duration, Easing.OutQuint);
base.OnHoverLost(state); base.OnHoverLost(e);
} }
} }
} }

View File

@ -8,7 +8,7 @@ using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Shapes;
using osu.Framework.Input.States; using osu.Framework.Input.Events;
using osu.Game.Graphics; using osu.Game.Graphics;
using osu.Game.Graphics.Containers; using osu.Game.Graphics.Containers;
using osu.Game.Graphics.Sprites; using osu.Game.Graphics.Sprites;
@ -70,7 +70,7 @@ namespace osu.Game.Overlays.Profile.Sections.Kudosu
}; };
} }
protected override bool OnClick(InputState state) => true; protected override bool OnClick(ClickEvent e) => true;
private class CountSection : Container private class CountSection : Container
{ {

View File

@ -5,7 +5,7 @@ using OpenTK.Graphics;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Shapes;
using osu.Framework.Input.States; using osu.Framework.Input.Events;
using osu.Game.Graphics.Backgrounds; using osu.Game.Graphics.Backgrounds;
using osu.Game.Graphics.Containers; using osu.Game.Graphics.Containers;
@ -101,7 +101,7 @@ namespace osu.Game.Overlays.SearchableList
scrollContainer.Padding = new MarginPadding { Top = Header.Height + Filter.Height }; scrollContainer.Padding = new MarginPadding { Top = Header.Height + Filter.Height };
} }
protected override void OnFocus(InputState state) protected override void OnFocus(FocusEvent e)
{ {
GetContainingInputManager().ChangeFocus(Filter.Search); GetContainingInputManager().ChangeFocus(Filter.Search);
} }

View File

@ -16,7 +16,7 @@ using System.ComponentModel;
using osu.Game.Graphics; using osu.Game.Graphics;
using OpenTK.Graphics; using OpenTK.Graphics;
using osu.Framework.Extensions.Color4Extensions; using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Input.States; using osu.Framework.Input.Events;
using RectangleF = osu.Framework.Graphics.Primitives.RectangleF; using RectangleF = osu.Framework.Graphics.Primitives.RectangleF;
using Container = osu.Framework.Graphics.Containers.Container; using Container = osu.Framework.Graphics.Containers.Container;
@ -175,12 +175,12 @@ namespace osu.Game.Overlays.Settings.Sections.General
public override bool AcceptsFocus => true; public override bool AcceptsFocus => true;
protected override bool OnClick(InputState state) => true; protected override bool OnClick(ClickEvent e) => true;
protected override void OnFocus(InputState state) protected override void OnFocus(FocusEvent e)
{ {
if (form != null) GetContainingInputManager().ChangeFocus(form); if (form != null) GetContainingInputManager().ChangeFocus(form);
base.OnFocus(state); base.OnFocus(e);
} }
private class LoginForm : FillFlowContainer private class LoginForm : FillFlowContainer
@ -244,9 +244,9 @@ namespace osu.Game.Overlays.Settings.Sections.General
public override bool AcceptsFocus => true; public override bool AcceptsFocus => true;
protected override bool OnClick(InputState state) => true; protected override bool OnClick(ClickEvent e) => true;
protected override void OnFocus(InputState state) protected override void OnFocus(FocusEvent e)
{ {
Schedule(() => { GetContainingInputManager().ChangeFocus(string.IsNullOrEmpty(username.Text) ? username : password); }); Schedule(() => { GetContainingInputManager().ChangeFocus(string.IsNullOrEmpty(username.Text) ? username : password); });
} }

View File

@ -5,7 +5,7 @@ using osu.Framework.Allocation;
using osu.Framework.Configuration; using osu.Framework.Configuration;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Input; using osu.Framework.Input;
using osu.Framework.Input.States; using osu.Framework.Input.Events;
using osu.Game.Configuration; using osu.Game.Configuration;
using osu.Game.Graphics.UserInterface; using osu.Game.Graphics.UserInterface;
@ -124,18 +124,18 @@ namespace osu.Game.Overlays.Settings.Sections.Input
private bool isDragging; private bool isDragging;
protected override bool OnDragStart(InputState state) protected override bool OnDragStart(DragStartEvent e)
{ {
isDragging = true; isDragging = true;
return base.OnDragStart(state); return base.OnDragStart(e);
} }
protected override bool OnDragEnd(InputState state) protected override bool OnDragEnd(DragEndEvent e)
{ {
isDragging = false; isDragging = false;
Current.TriggerChange(); Current.TriggerChange();
return base.OnDragEnd(state); return base.OnDragEnd(e);
} }
public override string TooltipText => Current.Disabled ? "Enable raw input to adjust sensitivity" : Current.Value.ToString(@"0.##x"); public override string TooltipText => Current.Disabled ? "Enable raw input to adjust sensitivity" : Current.Value.ToString(@"0.##x");

View File

@ -12,8 +12,7 @@ using osu.Framework.Graphics.Cursor;
using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Shapes;
using osu.Framework.Graphics.Sprites; using osu.Framework.Graphics.Sprites;
using osu.Framework.Graphics.UserInterface; using osu.Framework.Graphics.UserInterface;
using osu.Framework.Input.EventArgs; using osu.Framework.Input.Events;
using osu.Framework.Input.States;
using osu.Game.Graphics; using osu.Game.Graphics;
using osu.Game.Graphics.Sprites; using osu.Game.Graphics.Sprites;
using OpenTK; using OpenTK;
@ -168,25 +167,25 @@ namespace osu.Game.Overlays.Settings
public string TooltipText => "Revert to default"; public string TooltipText => "Revert to default";
protected override bool OnMouseDown(InputState state, MouseDownEventArgs args) => true; protected override bool OnMouseDown(MouseDownEvent e) => true;
protected override bool OnMouseUp(InputState state, MouseUpEventArgs args) => true; protected override bool OnMouseUp(MouseUpEvent e) => true;
protected override bool OnClick(InputState state) protected override bool OnClick(ClickEvent e)
{ {
if (bindable != null && !bindable.Disabled) if (bindable != null && !bindable.Disabled)
bindable.SetDefault(); bindable.SetDefault();
return true; return true;
} }
protected override bool OnHover(InputState state) protected override bool OnHover(HoverEvent e)
{ {
hovering = true; hovering = true;
UpdateState(); UpdateState();
return false; return false;
} }
protected override void OnHoverLost(InputState state) protected override void OnHoverLost(HoverLostEvent e)
{ {
hovering = false; hovering = false;
UpdateState(); UpdateState();

View File

@ -9,7 +9,7 @@ using OpenTK.Graphics;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Shapes;
using osu.Framework.Input.States; using osu.Framework.Input.Events;
using osu.Framework.Threading; using osu.Framework.Threading;
using osu.Game.Overlays.Toolbar; using osu.Game.Overlays.Toolbar;
@ -55,25 +55,25 @@ namespace osu.Game.Overlays.Settings
private ScheduledDelegate expandEvent; private ScheduledDelegate expandEvent;
private ExpandedState state; private ExpandedState state;
protected override bool OnHover(InputState state) protected override bool OnHover(HoverEvent e)
{ {
queueExpandIfHovering(); queueExpandIfHovering();
return true; return true;
} }
protected override void OnHoverLost(InputState state) protected override void OnHoverLost(HoverLostEvent e)
{ {
expandEvent?.Cancel(); expandEvent?.Cancel();
lastHoveredButton = null; lastHoveredButton = null;
State = ExpandedState.Contracted; State = ExpandedState.Contracted;
base.OnHoverLost(state); base.OnHoverLost(e);
} }
protected override bool OnMouseMove(InputState state) protected override bool OnMouseMove(MouseMoveEvent e)
{ {
queueExpandIfHovering(); queueExpandIfHovering();
return base.OnMouseMove(state); return base.OnMouseMove(e);
} }
private class SidebarScrollContainer : ScrollContainer private class SidebarScrollContainer : ScrollContainer

View File

@ -10,7 +10,7 @@ using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Shapes;
using osu.Framework.Graphics.Sprites; using osu.Framework.Graphics.Sprites;
using osu.Framework.Graphics.UserInterface; using osu.Framework.Graphics.UserInterface;
using osu.Framework.Input.States; using osu.Framework.Input.Events;
using osu.Game.Graphics; using osu.Game.Graphics;
using osu.Game.Graphics.Sprites; using osu.Game.Graphics.Sprites;
using osu.Game.Graphics.UserInterface; using osu.Game.Graphics.UserInterface;
@ -109,22 +109,22 @@ namespace osu.Game.Overlays.Settings
selectionIndicator.Colour = colours.Yellow; selectionIndicator.Colour = colours.Yellow;
} }
protected override bool OnClick(InputState state) protected override bool OnClick(ClickEvent e)
{ {
Action?.Invoke(section); Action?.Invoke(section);
return base.OnClick(state); return base.OnClick(e);
} }
protected override bool OnHover(InputState state) protected override bool OnHover(HoverEvent e)
{ {
Background.FadeTo(0.4f, 200); Background.FadeTo(0.4f, 200);
return base.OnHover(state); return base.OnHover(e);
} }
protected override void OnHoverLost(InputState state) protected override void OnHoverLost(HoverLostEvent e)
{ {
Background.FadeTo(0, 200); Background.FadeTo(0, 200);
base.OnHoverLost(state); base.OnHoverLost(e);
} }
} }
} }

View File

@ -11,7 +11,7 @@ using osu.Framework.Extensions.IEnumerableExtensions;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Shapes;
using osu.Framework.Input.States; using osu.Framework.Input.Events;
using osu.Game.Graphics.Containers; using osu.Game.Graphics.Containers;
using osu.Game.Graphics.UserInterface; using osu.Game.Graphics.UserInterface;
using osu.Game.Overlays.Settings; using osu.Game.Overlays.Settings;
@ -177,10 +177,10 @@ namespace osu.Game.Overlays
public override bool AcceptsFocus => true; public override bool AcceptsFocus => true;
protected override void OnFocus(InputState state) protected override void OnFocus(FocusEvent e)
{ {
GetContainingInputManager().ChangeFocus(searchTextBox); GetContainingInputManager().ChangeFocus(searchTextBox);
base.OnFocus(state); base.OnFocus(e);
} }
protected override void UpdateAfterChildren() protected override void UpdateAfterChildren()

View File

@ -6,7 +6,7 @@ using OpenTK.Graphics;
using osu.Framework.Extensions.Color4Extensions; using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Input.States; using osu.Framework.Input.Events;
using osu.Game.Users; using osu.Game.Users;
namespace osu.Game.Overlays.Social namespace osu.Game.Overlays.Social
@ -35,20 +35,20 @@ namespace osu.Game.Overlays.Social
Colour = Color4.Black.Opacity(0.3f), Colour = Color4.Black.Opacity(0.3f),
}; };
protected override bool OnHover(InputState state) protected override bool OnHover(HoverEvent e)
{ {
Content.TweenEdgeEffectTo(edgeEffectHovered, hover_transition_time, Easing.OutQuint); Content.TweenEdgeEffectTo(edgeEffectHovered, hover_transition_time, Easing.OutQuint);
Content.MoveToY(-4, hover_transition_time, Easing.OutQuint); Content.MoveToY(-4, hover_transition_time, Easing.OutQuint);
return base.OnHover(state); return base.OnHover(e);
} }
protected override void OnHoverLost(InputState state) protected override void OnHoverLost(HoverLostEvent e)
{ {
Content.TweenEdgeEffectTo(edgeEffectNormal, hover_transition_time, Easing.OutQuint); Content.TweenEdgeEffectTo(edgeEffectNormal, hover_transition_time, Easing.OutQuint);
Content.MoveToY(0, hover_transition_time, Easing.OutQuint); Content.MoveToY(0, hover_transition_time, Easing.OutQuint);
base.OnHoverLost(state); base.OnHoverLost(e);
} }
protected override void LoadComplete() protected override void LoadComplete()

View File

@ -11,7 +11,7 @@ using OpenTK;
using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Shapes;
using osu.Framework.Allocation; using osu.Framework.Allocation;
using osu.Framework.Configuration; using osu.Framework.Configuration;
using osu.Framework.Input.States; using osu.Framework.Input.Events;
namespace osu.Game.Overlays.Toolbar namespace osu.Game.Overlays.Toolbar
{ {
@ -121,14 +121,14 @@ namespace osu.Game.Overlays.Toolbar
}; };
} }
protected override bool OnHover(InputState state) protected override bool OnHover(HoverEvent e)
{ {
solidBackground.FadeTo(alpha_hovering, transition_time, Easing.OutQuint); solidBackground.FadeTo(alpha_hovering, transition_time, Easing.OutQuint);
gradientBackground.FadeIn(transition_time, Easing.OutQuint); gradientBackground.FadeIn(transition_time, Easing.OutQuint);
return true; return true;
} }
protected override void OnHoverLost(InputState state) protected override void OnHoverLost(HoverLostEvent e)
{ {
solidBackground.FadeTo(alpha_normal, transition_time, Easing.OutQuint); solidBackground.FadeTo(alpha_normal, transition_time, Easing.OutQuint);
gradientBackground.FadeOut(transition_time, Easing.OutQuint); gradientBackground.FadeOut(transition_time, Easing.OutQuint);

View File

@ -11,8 +11,7 @@ using osu.Game.Graphics.Sprites;
using OpenTK; using OpenTK;
using OpenTK.Graphics; using OpenTK.Graphics;
using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Shapes;
using osu.Framework.Input.EventArgs; using osu.Framework.Input.Events;
using osu.Framework.Input.States;
using osu.Game.Graphics.Containers; using osu.Game.Graphics.Containers;
using osu.Game.Graphics.UserInterface; using osu.Game.Graphics.UserInterface;
@ -145,22 +144,22 @@ namespace osu.Game.Overlays.Toolbar
}; };
} }
protected override bool OnMouseDown(InputState state, MouseDownEventArgs args) => true; protected override bool OnMouseDown(MouseDownEvent e) => true;
protected override bool OnClick(InputState state) protected override bool OnClick(ClickEvent e)
{ {
HoverBackground.FlashColour(Color4.White.Opacity(100), 500, Easing.OutQuint); HoverBackground.FlashColour(Color4.White.Opacity(100), 500, Easing.OutQuint);
return base.OnClick(state); return base.OnClick(e);
} }
protected override bool OnHover(InputState state) protected override bool OnHover(HoverEvent e)
{ {
HoverBackground.FadeIn(200); HoverBackground.FadeIn(200);
tooltipContainer.FadeIn(100); tooltipContainer.FadeIn(100);
return base.OnHover(state); return base.OnHover(e);
} }
protected override void OnHoverLost(InputState state) protected override void OnHoverLost(HoverLostEvent e)
{ {
HoverBackground.FadeOut(200); HoverBackground.FadeOut(200);
tooltipContainer.FadeOut(100); tooltipContainer.FadeOut(100);

View File

@ -11,8 +11,7 @@ using OpenTK.Input;
using OpenTK.Graphics; using OpenTK.Graphics;
using osu.Framework.Configuration; using osu.Framework.Configuration;
using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Shapes;
using osu.Framework.Input.EventArgs; using osu.Framework.Input.Events;
using osu.Framework.Input.States;
using osu.Game.Rulesets; using osu.Game.Rulesets;
namespace osu.Game.Overlays.Toolbar namespace osu.Game.Overlays.Toolbar
@ -86,13 +85,13 @@ namespace osu.Game.Overlays.Toolbar
ruleset.BindTo(parentRuleset); ruleset.BindTo(parentRuleset);
} }
protected override bool OnKeyDown(InputState state, KeyDownEventArgs args) protected override bool OnKeyDown(KeyDownEvent e)
{ {
base.OnKeyDown(state, args); base.OnKeyDown(e);
if (state.Keyboard.ControlPressed && !args.Repeat && args.Key >= Key.Number1 && args.Key <= Key.Number9) if (state.Keyboard.ControlPressed && !e.Repeat && e.Key >= Key.Number1 && e.Key <= Key.Number9)
{ {
int requested = args.Key - Key.Number1; int requested = e.Key - Key.Number1;
RulesetInfo found = rulesets.AvailableRulesets.Skip(requested).FirstOrDefault(); RulesetInfo found = rulesets.AvailableRulesets.Skip(requested).FirstOrDefault();
if (found != null) if (found != null)

View File

@ -9,7 +9,7 @@ using osu.Framework.Graphics.Colour;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Shapes;
using osu.Framework.Graphics.UserInterface; using osu.Framework.Graphics.UserInterface;
using osu.Framework.Input.States; using osu.Framework.Input.Events;
using osu.Game.Graphics; using osu.Game.Graphics;
using OpenTK; using OpenTK;
using OpenTK.Graphics; using OpenTK.Graphics;
@ -63,18 +63,18 @@ namespace osu.Game.Overlays.Volume
Current.TriggerChange(); Current.TriggerChange();
} }
protected override bool OnHover(InputState state) protected override bool OnHover(HoverEvent e)
{ {
this.TransformTo<MuteButton, SRGBColour>("BorderColour", hoveredColour, 500, Easing.OutQuint); this.TransformTo<MuteButton, SRGBColour>("BorderColour", hoveredColour, 500, Easing.OutQuint);
return false; return false;
} }
protected override void OnHoverLost(InputState state) protected override void OnHoverLost(HoverLostEvent e)
{ {
this.TransformTo<MuteButton, SRGBColour>("BorderColour", unhoveredColour, 500, Easing.OutQuint); this.TransformTo<MuteButton, SRGBColour>("BorderColour", unhoveredColour, 500, Easing.OutQuint);
} }
protected override bool OnClick(InputState state) protected override bool OnClick(ClickEvent e)
{ {
Current.Value = !Current.Value; Current.Value = !Current.Value;
return true; return true;

View File

@ -11,7 +11,7 @@ using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Effects; using osu.Framework.Graphics.Effects;
using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Shapes;
using osu.Framework.Graphics.UserInterface; using osu.Framework.Graphics.UserInterface;
using osu.Framework.Input.States; using osu.Framework.Input.Events;
using osu.Framework.MathUtils; using osu.Framework.MathUtils;
using osu.Game.Graphics; using osu.Game.Graphics;
using osu.Game.Graphics.Sprites; using osu.Game.Graphics.Sprites;
@ -239,21 +239,21 @@ namespace osu.Game.Overlays.Volume
adjustAccumulator = 0; adjustAccumulator = 0;
} }
protected override bool OnScroll(InputState state) protected override bool OnScroll(ScrollEvent e)
{ {
adjust(state.Mouse.ScrollDelta.Y, state.Mouse.HasPreciseScroll); adjust(e.Mouse.ScrollDelta.Y, e.Mouse.HasPreciseScroll);
return true; return true;
} }
private const float transition_length = 500; private const float transition_length = 500;
protected override bool OnHover(InputState state) protected override bool OnHover(HoverEvent e)
{ {
this.ScaleTo(1.04f, transition_length, Easing.OutExpo); this.ScaleTo(1.04f, transition_length, Easing.OutExpo);
return false; return false;
} }
protected override void OnHoverLost(InputState state) protected override void OnHoverLost(HoverLostEvent e)
{ {
this.ScaleTo(1f, transition_length, Easing.OutExpo); this.ScaleTo(1f, transition_length, Easing.OutExpo);
} }

View File

@ -9,7 +9,7 @@ using osu.Framework.Graphics;
using osu.Framework.Graphics.Colour; using osu.Framework.Graphics.Colour;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Shapes;
using osu.Framework.Input.States; using osu.Framework.Input.Events;
using osu.Framework.Threading; using osu.Framework.Threading;
using osu.Game.Graphics; using osu.Game.Graphics;
using osu.Game.Input.Bindings; using osu.Game.Input.Bindings;
@ -143,23 +143,23 @@ namespace osu.Game.Overlays
this.FadeOut(100); this.FadeOut(100);
} }
protected override bool OnMouseMove(InputState state) protected override bool OnMouseMove(MouseMoveEvent e)
{ {
// keep the scheduled event correctly timed as long as we have movement. // keep the scheduled event correctly timed as long as we have movement.
schedulePopOut(); schedulePopOut();
return base.OnMouseMove(state); return base.OnMouseMove(e);
} }
protected override bool OnHover(InputState state) protected override bool OnHover(HoverEvent e)
{ {
schedulePopOut(); schedulePopOut();
return true; return true;
} }
protected override void OnHoverLost(InputState state) protected override void OnHoverLost(HoverLostEvent e)
{ {
schedulePopOut(); schedulePopOut();
base.OnHoverLost(state); base.OnHoverLost(e);
} }
private void schedulePopOut() private void schedulePopOut()

View File

@ -5,7 +5,7 @@ using System;
using osu.Framework; using osu.Framework;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Primitives; using osu.Framework.Graphics.Primitives;
using osu.Framework.Input.EventArgs; using osu.Framework.Input.Events;
using osu.Framework.Input.States; using osu.Framework.Input.States;
using osu.Game.Graphics.UserInterface; using osu.Game.Graphics.UserInterface;
using osu.Game.Rulesets.Objects.Drawables; using osu.Game.Rulesets.Objects.Drawables;
@ -96,7 +96,7 @@ namespace osu.Game.Rulesets.Edit
private bool selectionRequested; private bool selectionRequested;
protected override bool OnMouseDown(InputState state, MouseDownEventArgs args) protected override bool OnMouseDown(MouseDownEvent e)
{ {
selectionRequested = false; selectionRequested = false;
@ -109,23 +109,23 @@ namespace osu.Game.Rulesets.Edit
return IsSelected; return IsSelected;
} }
protected override bool OnClick(InputState state) protected override bool OnClick(ClickEvent e)
{ {
if (State == SelectionState.Selected && !selectionRequested) if (State == SelectionState.Selected && !selectionRequested)
{ {
selectionRequested = true; selectionRequested = true;
SelectionRequested?.Invoke(this, state); SelectionRequested?.Invoke(this, e);
return true; return true;
} }
return base.OnClick(state); return base.OnClick(e);
} }
protected override bool OnDragStart(InputState state) => true; protected override bool OnDragStart(DragStartEvent e) => true;
protected override bool OnDrag(InputState state) protected override bool OnDrag(DragEvent e)
{ {
DragRequested?.Invoke(this, state); DragRequested?.Invoke(this, e);
return true; return true;
} }

View File

@ -211,16 +211,16 @@ namespace osu.Game.Rulesets.UI
mouseDisabled = config.GetBindable<bool>(OsuSetting.MouseDisableButtons); mouseDisabled = config.GetBindable<bool>(OsuSetting.MouseDisableButtons);
} }
protected override bool OnMouseDown(InputState state, MouseDownEventArgs args) protected override bool OnMouseDown(MouseDownEvent e)
{ {
if (mouseDisabled.Value && (args.Button == MouseButton.Left || args.Button == MouseButton.Right)) return false; if (mouseDisabled.Value && (e.Button == MouseButton.Left || e.Button == MouseButton.Right)) return false;
return base.OnMouseDown(state, args); return base.OnMouseDown(e);
} }
protected override bool OnMouseUp(InputState state, MouseUpEventArgs args) protected override bool OnMouseUp(MouseUpEvent e)
{ {
if (!CurrentState.Mouse.IsPressed(args.Button)) return false; if (!CurrentState.Mouse.IsPressed(e.Button)) return false;
return base.OnMouseUp(state, args); return base.OnMouseUp(e);
} }
#endregion #endregion

View File

@ -5,8 +5,7 @@ using System;
using System.Threading; using System.Threading;
using osu.Framework.Screens; using osu.Framework.Screens;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Input.EventArgs; using osu.Framework.Input.Events;
using osu.Framework.Input.States;
using OpenTK; using OpenTK;
namespace osu.Game.Screens namespace osu.Game.Screens
@ -21,7 +20,7 @@ namespace osu.Game.Screens
private const float transition_length = 500; private const float transition_length = 500;
private const float x_movement_amount = 50; private const float x_movement_amount = 50;
protected override bool OnKeyDown(InputState state, KeyDownEventArgs args) protected override bool OnKeyDown(KeyDownEvent e)
{ {
//we don't want to handle escape key. //we don't want to handle escape key.
return false; return false;

View File

@ -8,7 +8,7 @@ using osu.Framework.Extensions.IEnumerableExtensions;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.UserInterface; using osu.Framework.Graphics.UserInterface;
using osu.Framework.Input.States; using osu.Framework.Input.Events;
using osu.Framework.Timing; using osu.Framework.Timing;
using osu.Game.Graphics; using osu.Game.Graphics;
using osu.Game.Graphics.Sprites; using osu.Game.Graphics.Sprites;
@ -138,13 +138,13 @@ namespace osu.Game.Screens.Edit.Components
textBold.Colour = hoveredColour = colours.Yellow; textBold.Colour = hoveredColour = colours.Yellow;
} }
protected override bool OnHover(InputState state) protected override bool OnHover(HoverEvent e)
{ {
updateState(); updateState();
return true; return true;
} }
protected override void OnHoverLost(InputState state) => updateState(); protected override void OnHoverLost(HoverLostEvent e) => updateState();
protected override void OnActivated() => updateState(); protected override void OnActivated() => updateState();
protected override void OnDeactivated() => updateState(); protected override void OnDeactivated() => updateState();

View File

@ -6,8 +6,7 @@ using osu.Framework.Allocation;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Shapes;
using osu.Framework.Input.EventArgs; using osu.Framework.Input.Events;
using osu.Framework.Input.States;
using osu.Framework.Timing; using osu.Framework.Timing;
using osu.Game.Beatmaps; using osu.Game.Beatmaps;
using osu.Game.Graphics; using osu.Game.Graphics;
@ -30,15 +29,15 @@ namespace osu.Game.Screens.Edit.Components.Timelines.Summary.Parts
Add(marker = new MarkerVisualisation()); Add(marker = new MarkerVisualisation());
} }
protected override bool OnDragStart(InputState state) => true; protected override bool OnDragStart(DragStartEvent e) => true;
protected override bool OnDragEnd(InputState state) => true; protected override bool OnDragEnd(DragEndEvent e) => true;
protected override bool OnDrag(InputState state) protected override bool OnDrag(DragEvent e)
{ {
seekToPosition(state.Mouse.NativeState.Position); seekToPosition(e.Mouse.NativeState.Position);
return true; return true;
} }
protected override bool OnMouseDown(InputState state, MouseDownEventArgs args) protected override bool OnMouseDown(MouseDownEvent e)
{ {
seekToPosition(state.Mouse.NativeState.Position); seekToPosition(state.Mouse.NativeState.Position);
return true; return true;

View File

@ -12,7 +12,7 @@ using osu.Game.Screens.Edit.Menus;
using osu.Game.Screens.Edit.Components.Timelines.Summary; using osu.Game.Screens.Edit.Components.Timelines.Summary;
using osu.Framework.Allocation; using osu.Framework.Allocation;
using osu.Framework.Graphics.UserInterface; using osu.Framework.Graphics.UserInterface;
using osu.Framework.Input.States; using osu.Framework.Input.Events;
using osu.Framework.Platform; using osu.Framework.Platform;
using osu.Framework.Timing; using osu.Framework.Timing;
using osu.Game.Graphics.UserInterface; using osu.Game.Graphics.UserInterface;
@ -182,9 +182,9 @@ namespace osu.Game.Screens.Edit
LoadComponentAsync(currentScreen, screenContainer.Add); LoadComponentAsync(currentScreen, screenContainer.Add);
} }
protected override bool OnScroll(InputState state) protected override bool OnScroll(ScrollEvent e)
{ {
if (state.Mouse.ScrollDelta.X + state.Mouse.ScrollDelta.Y > 0) if (e.Mouse.ScrollDelta.X + e.Mouse.ScrollDelta.Y > 0)
clock.SeekBackward(!clock.IsRunning); clock.SeekBackward(!clock.IsRunning);
else else
clock.SeekForward(!clock.IsRunning); clock.SeekForward(!clock.IsRunning);

View File

@ -11,7 +11,7 @@ using osu.Game.Graphics.UserInterface;
using OpenTK; using OpenTK;
using OpenTK.Graphics; using OpenTK.Graphics;
using osu.Framework.Configuration; using osu.Framework.Configuration;
using osu.Framework.Input.States; using osu.Framework.Input.Events;
using osu.Game.Screens.Edit.Screens; using osu.Game.Screens.Edit.Screens;
namespace osu.Game.Screens.Edit.Menus namespace osu.Game.Screens.Edit.Menus
@ -171,18 +171,18 @@ namespace osu.Game.Screens.Edit.Menus
{ {
} }
protected override bool OnHover(InputState state) protected override bool OnHover(HoverEvent e)
{ {
if (Item is EditorMenuItemSpacer) if (Item is EditorMenuItemSpacer)
return true; return true;
return base.OnHover(state); return base.OnHover(e);
} }
protected override bool OnClick(InputState state) protected override bool OnClick(ClickEvent e)
{ {
if (Item is EditorMenuItemSpacer) if (Item is EditorMenuItemSpacer)
return true; return true;
return base.OnClick(state); return base.OnClick(e);
} }
} }
} }

View File

@ -12,7 +12,7 @@ using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Shapes;
using osu.Framework.Graphics.Sprites; using osu.Framework.Graphics.Sprites;
using osu.Framework.Graphics.UserInterface; using osu.Framework.Graphics.UserInterface;
using osu.Framework.Input.EventArgs; using osu.Framework.Input.Events;
using osu.Framework.Input.States; using osu.Framework.Input.States;
using osu.Game.Graphics; using osu.Game.Graphics;
using osu.Game.Graphics.UserInterface; using osu.Game.Graphics.UserInterface;
@ -233,9 +233,9 @@ namespace osu.Game.Screens.Edit.Screens.Compose
public override bool HandleNonPositionalInput => IsHovered && !CurrentNumber.Disabled; public override bool HandleNonPositionalInput => IsHovered && !CurrentNumber.Disabled;
protected override bool OnKeyDown(InputState state, KeyDownEventArgs args) protected override bool OnKeyDown(KeyDownEvent e)
{ {
switch (args.Key) switch (e.Key)
{ {
case Key.Right: case Key.Right:
beatDivisor.Next(); beatDivisor.Next();
@ -250,27 +250,27 @@ namespace osu.Game.Screens.Edit.Screens.Compose
} }
} }
protected override bool OnMouseDown(InputState state, MouseDownEventArgs args) protected override bool OnMouseDown(MouseDownEvent e)
{ {
marker.Active = true; marker.Active = true;
return base.OnMouseDown(state, args); return base.OnMouseDown(e);
} }
protected override bool OnMouseUp(InputState state, MouseUpEventArgs args) protected override bool OnMouseUp(MouseUpEvent e)
{ {
marker.Active = false; marker.Active = false;
return base.OnMouseUp(state, args); return base.OnMouseUp(e);
} }
protected override bool OnClick(InputState state) protected override bool OnClick(ClickEvent e)
{ {
handleMouseInput(state); handleMouseInput(e);
return true; return true;
} }
protected override bool OnDrag(InputState state) protected override bool OnDrag(DragEvent e)
{ {
handleMouseInput(state); handleMouseInput(e);
return true; return true;
} }

View File

@ -7,7 +7,7 @@ using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Primitives; using osu.Framework.Graphics.Primitives;
using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Shapes;
using osu.Framework.Input.States; using osu.Framework.Input.Events;
using osu.Game.Rulesets.Edit; using osu.Game.Rulesets.Edit;
using OpenTK.Graphics; using OpenTK.Graphics;
@ -56,16 +56,16 @@ namespace osu.Game.Screens.Edit.Screens.Compose.Layers
}; };
} }
protected override bool OnDragStart(InputState state) protected override bool OnDragStart(DragStartEvent e)
{ {
this.FadeIn(250, Easing.OutQuint); this.FadeIn(250, Easing.OutQuint);
return true; return true;
} }
protected override bool OnDrag(InputState state) protected override bool OnDrag(DragEvent e)
{ {
var dragPosition = state.Mouse.NativeState.Position; var dragPosition = e.Mouse.NativeState.Position;
var dragStartPosition = state.Mouse.NativeState.PositionMouseDown ?? dragPosition; var dragStartPosition = e.Mouse.NativeState.PositionMouseDown ?? dragPosition;
var dragQuad = new Quad(dragStartPosition.X, dragStartPosition.Y, dragPosition.X - dragStartPosition.X, dragPosition.Y - dragStartPosition.Y); var dragQuad = new Quad(dragStartPosition.X, dragStartPosition.Y, dragPosition.X - dragStartPosition.X, dragPosition.Y - dragStartPosition.Y);
@ -82,7 +82,7 @@ namespace osu.Game.Screens.Edit.Screens.Compose.Layers
return true; return true;
} }
protected override bool OnDragEnd(InputState state) protected override bool OnDragEnd(DragEndEvent e)
{ {
this.FadeOut(250, Easing.OutQuint); this.FadeOut(250, Easing.OutQuint);
DragEnd?.Invoke(); DragEnd?.Invoke();

View File

@ -4,8 +4,7 @@
using osu.Framework.Allocation; using osu.Framework.Allocation;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Input.EventArgs; using osu.Framework.Input.Events;
using osu.Framework.Input.States;
using osu.Game.Rulesets.Edit; using osu.Game.Rulesets.Edit;
using osu.Game.Rulesets.Objects.Drawables; using osu.Game.Rulesets.Objects.Drawables;
@ -52,7 +51,7 @@ namespace osu.Game.Screens.Edit.Screens.Compose.Layers
addMask(obj); addMask(obj);
} }
protected override bool OnMouseDown(InputState state, MouseDownEventArgs args) protected override bool OnMouseDown(MouseDownEvent e)
{ {
maskContainer.DeselectAll(); maskContainer.DeselectAll();
return true; return true;

View File

@ -10,7 +10,7 @@ using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Shapes;
using osu.Framework.Graphics.Sprites; using osu.Framework.Graphics.Sprites;
using osu.Framework.Input.States; using osu.Framework.Input.Events;
using osu.Game.Graphics; using osu.Game.Graphics;
using osu.Game.Graphics.Sprites; using osu.Game.Graphics.Sprites;
using osu.Game.Graphics.UserInterface; using osu.Game.Graphics.UserInterface;
@ -99,7 +99,7 @@ namespace osu.Game.Screens.Edit.Screens.Compose.RadioButtons
bubble.Colour = button.Selected ? selectedBubbleColour : defaultBubbleColour; bubble.Colour = button.Selected ? selectedBubbleColour : defaultBubbleColour;
} }
protected override bool OnClick(InputState state) protected override bool OnClick(ClickEvent e)
{ {
if (button.Selected) if (button.Selected)
return true; return true;
@ -109,7 +109,7 @@ namespace osu.Game.Screens.Edit.Screens.Compose.RadioButtons
button.Selected.Value = true; button.Selected.Value = true;
return base.OnClick(state); return base.OnClick(e);
} }
protected override SpriteText CreateText() => new OsuSpriteText protected override SpriteText CreateText() => new OsuSpriteText

View File

@ -7,8 +7,7 @@ using osu.Framework.Configuration;
using osu.Framework.Extensions.Color4Extensions; using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Audio; using osu.Framework.Graphics.Audio;
using osu.Framework.Input.EventArgs; using osu.Framework.Input.Events;
using osu.Framework.Input.States;
using osu.Framework.Timing; using osu.Framework.Timing;
using osu.Game.Beatmaps; using osu.Game.Beatmaps;
using osu.Game.Graphics; using osu.Game.Graphics;
@ -133,9 +132,9 @@ namespace osu.Game.Screens.Edit.Screens.Compose.Timeline
ScrollTo((float)(adjustableClock.CurrentTime / track.Length) * Content.DrawWidth, false); ScrollTo((float)(adjustableClock.CurrentTime / track.Length) * Content.DrawWidth, false);
} }
protected override bool OnMouseDown(InputState state, MouseDownEventArgs args) protected override bool OnMouseDown(MouseDownEvent e)
{ {
if (base.OnMouseDown(state, args)) if (base.OnMouseDown(e))
{ {
beginUserDrag(); beginUserDrag();
return true; return true;
@ -144,10 +143,10 @@ namespace osu.Game.Screens.Edit.Screens.Compose.Timeline
return false; return false;
} }
protected override bool OnMouseUp(InputState state, MouseUpEventArgs args) protected override bool OnMouseUp(MouseUpEvent e)
{ {
endUserDrag(); endUserDrag();
return base.OnMouseUp(state, args); return base.OnMouseUp(e);
} }
private void beginUserDrag() private void beginUserDrag()

View File

@ -5,7 +5,7 @@ using System;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Transforms; using osu.Framework.Graphics.Transforms;
using osu.Framework.Input.States; using osu.Framework.Input.Events;
using osu.Framework.MathUtils; using osu.Framework.MathUtils;
using OpenTK; using OpenTK;
@ -97,13 +97,13 @@ namespace osu.Game.Screens.Edit.Screens.Compose.Timeline
zoomedContent.Width = DrawWidth * currentZoom; zoomedContent.Width = DrawWidth * currentZoom;
} }
protected override bool OnScroll(InputState state) protected override bool OnScroll(ScrollEvent e)
{ {
if (state.Mouse.HasPreciseScroll) if (e.Mouse.HasPreciseScroll)
// for now, we don't support zoom when using a precision scroll device. this needs gesture support. // for now, we don't support zoom when using a precision scroll device. this needs gesture support.
return base.OnScroll(state); return base.OnScroll(e);
setZoomTarget(zoomTarget + state.Mouse.ScrollDelta.Y, zoomedContent.ToLocalSpace(state.Mouse.NativeState.Position).X); setZoomTarget(zoomTarget + e.Mouse.ScrollDelta.Y, zoomedContent.ToLocalSpace(e.Mouse.NativeState.Position).X);
return true; return true;
} }

View File

@ -17,8 +17,7 @@ using OpenTK.Input;
using osu.Framework.Extensions.Color4Extensions; using osu.Framework.Extensions.Color4Extensions;
using osu.Game.Graphics.Containers; using osu.Game.Graphics.Containers;
using osu.Framework.Audio.Track; using osu.Framework.Audio.Track;
using osu.Framework.Input.EventArgs; using osu.Framework.Input.Events;
using osu.Framework.Input.States;
using osu.Game.Beatmaps.ControlPoints; using osu.Game.Beatmaps.ControlPoints;
namespace osu.Game.Screens.Menu namespace osu.Game.Screens.Menu
@ -151,7 +150,7 @@ namespace osu.Game.Screens.Menu
rightward = !rightward; rightward = !rightward;
} }
protected override bool OnHover(InputState state) protected override bool OnHover(HoverEvent e)
{ {
if (State != ButtonState.Expanded) return true; if (State != ButtonState.Expanded) return true;
@ -167,7 +166,7 @@ namespace osu.Game.Screens.Menu
return true; return true;
} }
protected override void OnHoverLost(InputState state) protected override void OnHoverLost(HoverLostEvent e)
{ {
icon.ClearTransforms(); icon.ClearTransforms();
icon.RotateTo(0, 500, Easing.Out); icon.RotateTo(0, 500, Easing.Out);
@ -186,30 +185,30 @@ namespace osu.Game.Screens.Menu
sampleClick = audio.Sample.Get($@"Menu/{sampleName}"); sampleClick = audio.Sample.Get($@"Menu/{sampleName}");
} }
protected override bool OnMouseDown(InputState state, MouseDownEventArgs args) protected override bool OnMouseDown(MouseDownEvent e)
{ {
boxHoverLayer.FadeTo(0.1f, 1000, Easing.OutQuint); boxHoverLayer.FadeTo(0.1f, 1000, 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)
{ {
boxHoverLayer.FadeTo(0, 1000, Easing.OutQuint); boxHoverLayer.FadeTo(0, 1000, Easing.OutQuint);
return base.OnMouseUp(state, args); return base.OnMouseUp(e);
} }
protected override bool OnClick(InputState state) protected override bool OnClick(ClickEvent e)
{ {
trigger(); trigger();
return true; return true;
} }
protected override bool OnKeyDown(InputState state, KeyDownEventArgs args) protected override bool OnKeyDown(KeyDownEvent e)
{ {
if (args.Repeat || state.Keyboard.ControlPressed || state.Keyboard.ShiftPressed || state.Keyboard.AltPressed) if (e.Repeat || state.Keyboard.ControlPressed || state.Keyboard.ShiftPressed || state.Keyboard.AltPressed)
return false; return false;
if (triggerKey == args.Key && triggerKey != Key.Unknown) if (triggerKey == e.Key && triggerKey != Key.Unknown)
{ {
trigger(); trigger();
return true; return true;

View File

@ -6,8 +6,7 @@ using OpenTK.Graphics;
using OpenTK.Input; using OpenTK.Input;
using osu.Framework.Allocation; using osu.Framework.Allocation;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Input.EventArgs; using osu.Framework.Input.Events;
using osu.Framework.Input.States;
using osu.Framework.Screens; using osu.Framework.Screens;
using osu.Game.Beatmaps; using osu.Game.Beatmaps;
using osu.Game.Graphics; using osu.Game.Graphics;
@ -200,15 +199,15 @@ namespace osu.Game.Screens.Menu
return base.OnExiting(next); return base.OnExiting(next);
} }
protected override bool OnKeyDown(InputState state, KeyDownEventArgs args) protected override bool OnKeyDown(KeyDownEvent e)
{ {
if (!args.Repeat && state.Keyboard.ControlPressed && state.Keyboard.ShiftPressed && args.Key == Key.D) if (!e.Repeat && state.Keyboard.ControlPressed && state.Keyboard.ShiftPressed && e.Key == Key.D)
{ {
Push(new Drawings()); Push(new Drawings());
return true; return true;
} }
return base.OnKeyDown(state, args); return base.OnKeyDown(e);
} }
} }
} }

View File

@ -11,8 +11,7 @@ using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Shapes;
using osu.Framework.Graphics.Sprites; using osu.Framework.Graphics.Sprites;
using osu.Framework.Graphics.Textures; using osu.Framework.Graphics.Textures;
using osu.Framework.Input.EventArgs; using osu.Framework.Input.Events;
using osu.Framework.Input.States;
using osu.Framework.MathUtils; using osu.Framework.MathUtils;
using osu.Game.Beatmaps.ControlPoints; using osu.Game.Beatmaps.ControlPoints;
using osu.Game.Graphics; using osu.Game.Graphics;
@ -344,23 +343,23 @@ namespace osu.Game.Screens.Menu
public override bool HandlePositionalInput => base.HandlePositionalInput && Action != null && Alpha > 0.2f; public override bool HandlePositionalInput => base.HandlePositionalInput && Action != null && Alpha > 0.2f;
protected override bool OnMouseDown(InputState state, MouseDownEventArgs args) protected override bool OnMouseDown(MouseDownEvent e)
{ {
if (args.Button != MouseButton.Left) return false; if (e.Button != MouseButton.Left) return false;
logoBounceContainer.ScaleTo(0.9f, 1000, Easing.Out); logoBounceContainer.ScaleTo(0.9f, 1000, Easing.Out);
return true; return true;
} }
protected override bool OnMouseUp(InputState state, MouseUpEventArgs args) protected override bool OnMouseUp(MouseUpEvent e)
{ {
if (args.Button != MouseButton.Left) return false; if (e.Button != MouseButton.Left) return false;
logoBounceContainer.ScaleTo(1f, 500, Easing.OutElastic); logoBounceContainer.ScaleTo(1f, 500, Easing.OutElastic);
return true; return true;
} }
protected override bool OnClick(InputState state) protected override bool OnClick(ClickEvent e)
{ {
if (Action?.Invoke() ?? true) if (Action?.Invoke() ?? true)
sampleClick.Play(); sampleClick.Play();
@ -371,13 +370,13 @@ namespace osu.Game.Screens.Menu
return true; return true;
} }
protected override bool OnHover(InputState state) protected override bool OnHover(HoverEvent e)
{ {
logoHoverContainer.ScaleTo(1.1f, 500, Easing.OutElastic); logoHoverContainer.ScaleTo(1.1f, 500, Easing.OutElastic);
return true; return true;
} }
protected override void OnHoverLost(InputState state) protected override void OnHoverLost(HoverLostEvent e)
{ {
logoHoverContainer.ScaleTo(1, 500, Easing.OutElastic); logoHoverContainer.ScaleTo(1, 500, Easing.OutElastic);
} }

View File

@ -10,7 +10,7 @@ using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Shapes;
using osu.Framework.Input.States; using osu.Framework.Input.Events;
using osu.Game.Beatmaps; using osu.Game.Beatmaps;
using osu.Game.Beatmaps.Drawables; using osu.Game.Beatmaps.Drawables;
using osu.Game.Graphics; using osu.Game.Graphics;
@ -246,7 +246,7 @@ namespace osu.Game.Screens.Multi.Components
this.FadeInFromZero(transition_duration); this.FadeInFromZero(transition_duration);
} }
protected override bool OnClick(InputState state) protected override bool OnClick(ClickEvent e)
{ {
if (Enabled.Value) if (Enabled.Value)
{ {

View File

@ -6,7 +6,7 @@ using System.Linq;
using osu.Framework.Extensions.IEnumerableExtensions; using osu.Framework.Extensions.IEnumerableExtensions;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Input.States; using osu.Framework.Input.Events;
using osu.Framework.Screens; using osu.Framework.Screens;
using osu.Game.Graphics.UserInterface; using osu.Game.Graphics.UserInterface;
using osu.Game.Online.Multiplayer; using osu.Game.Online.Multiplayer;
@ -112,7 +112,7 @@ namespace osu.Game.Screens.Multi.Screens.Lounge
}; };
} }
protected override void OnFocus(InputState state) protected override void OnFocus(FocusEvent e)
{ {
GetContainingInputManager().ChangeFocus(Filter.Search); GetContainingInputManager().ChangeFocus(Filter.Search);
} }

View File

@ -8,8 +8,7 @@ using osu.Framework.Graphics;
using osu.Framework.Graphics.Colour; using osu.Framework.Graphics.Colour;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Shapes;
using osu.Framework.Input.EventArgs; using osu.Framework.Input.Events;
using osu.Framework.Input.States;
using osu.Game.Beatmaps; using osu.Game.Beatmaps;
using osu.Game.Beatmaps.Drawables; using osu.Game.Beatmaps.Drawables;
using osu.Game.Graphics; using osu.Game.Graphics;
@ -151,28 +150,28 @@ namespace osu.Game.Screens.Multi.Screens.Match
border.BorderColour = colours.Yellow; border.BorderColour = colours.Yellow;
} }
protected override bool OnHover(InputState state) protected override bool OnHover(HoverEvent e)
{ {
border.FadeIn(transition_duration); border.FadeIn(transition_duration);
return base.OnHover(state); return base.OnHover(e);
} }
protected override void OnHoverLost(InputState state) protected override void OnHoverLost(HoverLostEvent e)
{ {
base.OnHoverLost(state); base.OnHoverLost(e);
border.FadeOut(transition_duration); border.FadeOut(transition_duration);
} }
protected override bool OnMouseDown(InputState state, MouseDownEventArgs args) protected override bool OnMouseDown(MouseDownEvent e)
{ {
bg.FadeTo(0.75f, 1000, Easing.Out); bg.FadeTo(0.75f, 1000, Easing.Out);
return base.OnMouseDown(state, args); return base.OnMouseDown(e);
} }
protected override bool OnMouseUp(InputState state, MouseUpEventArgs args) protected override bool OnMouseUp(MouseUpEvent e)
{ {
bg.FadeTo(bg_opacity, transition_duration); bg.FadeTo(bg_opacity, transition_duration);
return base.OnMouseUp(state, args); return base.OnMouseUp(e);
} }
} }
} }

View File

@ -16,8 +16,7 @@ using OpenTK.Input;
using System.Collections.Generic; using System.Collections.Generic;
using System.Linq; using System.Linq;
using osu.Framework.Input.Bindings; using osu.Framework.Input.Bindings;
using osu.Framework.Input.EventArgs; using osu.Framework.Input.Events;
using osu.Framework.Input.States;
using osu.Game.Input.Bindings; using osu.Game.Input.Bindings;
namespace osu.Game.Screens.Play namespace osu.Game.Screens.Play
@ -155,11 +154,11 @@ namespace osu.Game.Screens.Play
protected override void PopOut() => this.FadeOut(transition_duration, Easing.In); protected override void PopOut() => this.FadeOut(transition_duration, Easing.In);
// Don't let mouse down events through the overlay or people can click circles while paused. // Don't let mouse down events through the overlay or people can click circles while paused.
protected override bool OnMouseDown(InputState state, MouseDownEventArgs args) => true; protected override bool OnMouseDown(MouseDownEvent e) => true;
protected override bool OnMouseUp(InputState state, MouseUpEventArgs args) => true; protected override bool OnMouseUp(MouseUpEvent e) => true;
protected override bool OnMouseMove(InputState state) => true; protected override bool OnMouseMove(MouseMoveEvent e) => true;
protected void AddButton(string text, Color4 colour, Action action) protected void AddButton(string text, Color4 colour, Action action)
{ {
@ -204,11 +203,11 @@ namespace osu.Game.Screens.Play
} }
} }
protected override bool OnKeyDown(InputState state, KeyDownEventArgs args) protected override bool OnKeyDown(KeyDownEvent e)
{ {
if (!args.Repeat) if (!e.Repeat)
{ {
switch (args.Key) switch (e.Key)
{ {
case Key.Up: case Key.Up:
if (selectionIndex == -1 || selectionIndex == 0) if (selectionIndex == -1 || selectionIndex == 0)
@ -225,7 +224,7 @@ namespace osu.Game.Screens.Play
} }
} }
return base.OnKeyDown(state, args); return base.OnKeyDown(e);
} }
public bool OnPressed(GlobalAction action) public bool OnPressed(GlobalAction action)
@ -283,17 +282,17 @@ namespace osu.Game.Screens.Play
private class Button : DialogButton private class Button : DialogButton
{ {
protected override bool OnHover(InputState state) => true; protected override bool OnHover(HoverEvent e) => true;
protected override bool OnMouseMove(InputState state) protected override bool OnMouseMove(MouseMoveEvent e)
{ {
Selected.Value = true; Selected.Value = true;
return base.OnMouseMove(state); return base.OnMouseMove(e);
} }
protected override bool OnKeyDown(InputState state, KeyDownEventArgs args) protected override bool OnKeyDown(KeyDownEvent e)
{ {
if (args.Repeat || args.Key != Key.Enter || !Selected) if (e.Repeat || e.Key != Key.Enter || !Selected)
return false; return false;
OnClick(state); OnClick(state);

View File

@ -12,7 +12,7 @@ using osu.Game.Rulesets.UI;
using OpenTK; using OpenTK;
using osu.Game.Graphics.Containers; using osu.Game.Graphics.Containers;
using System.Linq; using System.Linq;
using osu.Framework.Input.States; using osu.Framework.Input.Events;
namespace osu.Game.Screens.Play.HUD namespace osu.Game.Screens.Play.HUD
{ {
@ -93,16 +93,16 @@ namespace osu.Game.Screens.Play.HUD
private void contract() => iconsContainer.TransformSpacingTo(new Vector2(-25, 0), 500, Easing.OutQuint); private void contract() => iconsContainer.TransformSpacingTo(new Vector2(-25, 0), 500, Easing.OutQuint);
protected override bool OnHover(InputState state) protected override bool OnHover(HoverEvent e)
{ {
expand(); expand();
return base.OnHover(state); return base.OnHover(e);
} }
protected override void OnHoverLost(InputState state) protected override void OnHoverLost(HoverLostEvent e)
{ {
contract(); contract();
base.OnHoverLost(state); base.OnHoverLost(e);
} }
} }
} }

View File

@ -3,8 +3,7 @@
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Input.EventArgs; using osu.Framework.Input.Events;
using osu.Framework.Input.States;
using OpenTK; using OpenTK;
using osu.Game.Screens.Play.PlayerSettings; using osu.Game.Screens.Play.PlayerSettings;
using OpenTK.Input; using OpenTK.Input;
@ -53,20 +52,20 @@ namespace osu.Game.Screens.Play.HUD
//We want to handle keyboard inputs all the time in order to trigger ToggleVisibility() when not visible //We want to handle keyboard inputs all the time in order to trigger ToggleVisibility() when not visible
public override bool HandleNonPositionalInput => true; public override bool HandleNonPositionalInput => true;
protected override bool OnKeyDown(InputState state, KeyDownEventArgs args) protected override bool OnKeyDown(KeyDownEvent e)
{ {
if (args.Repeat) return false; if (e.Repeat) return false;
if (state.Keyboard.ControlPressed) if (state.Keyboard.ControlPressed)
{ {
if (args.Key == Key.H && ReplayLoaded) if (e.Key == Key.H && ReplayLoaded)
{ {
ToggleVisibility(); ToggleVisibility();
return true; return true;
} }
} }
return base.OnKeyDown(state, args); return base.OnKeyDown(e);
} }
} }
} }

View File

@ -2,14 +2,12 @@
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using System; using System;
using System.Linq;
using osu.Framework.Allocation; using osu.Framework.Allocation;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Shapes;
using osu.Framework.Graphics.UserInterface; using osu.Framework.Graphics.UserInterface;
using osu.Framework.Input.EventArgs; using osu.Framework.Input.Events;
using osu.Framework.Input.States;
using osu.Framework.MathUtils; using osu.Framework.MathUtils;
using osu.Game.Graphics; using osu.Game.Graphics;
using osu.Game.Graphics.Containers; using osu.Game.Graphics.Containers;
@ -62,10 +60,10 @@ namespace osu.Game.Screens.Play.HUD
private float positionalAdjust; private float positionalAdjust;
protected override bool OnMouseMove(InputState state) protected override bool OnMouseMove(MouseMoveEvent e)
{ {
positionalAdjust = Vector2.Distance(state.Mouse.NativeState.Position, button.ScreenSpaceDrawQuad.Centre) / 200; positionalAdjust = Vector2.Distance(e.Mouse.NativeState.Position, button.ScreenSpaceDrawQuad.Centre) / 200;
return base.OnMouseMove(state); return base.OnMouseMove(e);
} }
protected override void Update() protected override void Update()
@ -170,26 +168,26 @@ namespace osu.Game.Screens.Play.HUD
}); });
} }
protected override bool OnHover(InputState state) protected override bool OnHover(HoverEvent e)
{ {
HoverGained?.Invoke(); HoverGained?.Invoke();
return true; return true;
} }
protected override void OnHoverLost(InputState state) protected override void OnHoverLost(HoverLostEvent e)
{ {
HoverLost?.Invoke(); HoverLost?.Invoke();
base.OnHoverLost(state); base.OnHoverLost(e);
} }
protected override bool OnMouseDown(InputState state, MouseDownEventArgs args) protected override bool OnMouseDown(MouseDownEvent e)
{ {
if (!pendingAnimation && state.Mouse.Buttons.Count() == 1) if (!pendingAnimation && state.Mouse.Buttons.Count() == 1)
BeginConfirm(); BeginConfirm();
return true; return true;
} }
protected override bool OnMouseUp(InputState state, MouseUpEventArgs args) protected override bool OnMouseUp(MouseUpEvent e)
{ {
if (!state.Mouse.Buttons.Any()) if (!state.Mouse.Buttons.Any())
AbortConfirm(); AbortConfirm();

View File

@ -5,8 +5,7 @@ using osu.Framework.Allocation;
using osu.Framework.Configuration; using osu.Framework.Configuration;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Input.EventArgs; using osu.Framework.Input.Events;
using osu.Framework.Input.States;
using osu.Framework.Timing; using osu.Framework.Timing;
using osu.Game.Beatmaps; using osu.Game.Beatmaps;
using osu.Game.Configuration; using osu.Game.Configuration;
@ -152,13 +151,13 @@ namespace osu.Game.Screens.Play
Progress.BindRulestContainer(rulesetContainer); Progress.BindRulestContainer(rulesetContainer);
} }
protected override bool OnKeyDown(InputState state, KeyDownEventArgs args) protected override bool OnKeyDown(KeyDownEvent e)
{ {
if (args.Repeat) return false; if (e.Repeat) return false;
if (state.Keyboard.ShiftPressed) if (state.Keyboard.ShiftPressed)
{ {
switch (args.Key) switch (e.Key)
{ {
case Key.Tab: case Key.Tab:
showHud.Value = !showHud.Value; showHud.Value = !showHud.Value;
@ -166,7 +165,7 @@ namespace osu.Game.Screens.Play
} }
} }
return base.OnKeyDown(state, args); return base.OnKeyDown(e);
} }
protected virtual RollingCounter<double> CreateAccuracyCounter() => new PercentageCounter protected virtual RollingCounter<double> CreateAccuracyCounter() => new PercentageCounter

View File

@ -1,8 +1,7 @@
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>. // Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Framework.Input.EventArgs; using osu.Framework.Input.Events;
using osu.Framework.Input.States;
using OpenTK.Input; using OpenTK.Input;
namespace osu.Game.Screens.Play namespace osu.Game.Screens.Play
@ -15,16 +14,16 @@ namespace osu.Game.Screens.Play
Key = key; Key = key;
} }
protected override bool OnKeyDown(InputState state, KeyDownEventArgs args) protected override bool OnKeyDown(KeyDownEvent e)
{ {
if (args.Key == Key) IsLit = true; if (e.Key == Key) IsLit = true;
return base.OnKeyDown(state, args); return base.OnKeyDown(e);
} }
protected override bool OnKeyUp(InputState state, KeyUpEventArgs args) protected override bool OnKeyUp(KeyUpEvent e)
{ {
if (args.Key == Key) IsLit = false; if (e.Key == Key) IsLit = false;
return base.OnKeyUp(state, args); return base.OnKeyUp(e);
} }
} }
} }

View File

@ -1,8 +1,7 @@
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>. // Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE // Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Framework.Input.EventArgs; using osu.Framework.Input.Events;
using osu.Framework.Input.States;
using OpenTK.Input; using OpenTK.Input;
using OpenTK; using OpenTK;
@ -32,16 +31,16 @@ namespace osu.Game.Screens.Play
} }
} }
protected override bool OnMouseDown(InputState state, MouseDownEventArgs args) protected override bool OnMouseDown(MouseDownEvent e)
{ {
if (args.Button == Button) IsLit = true; if (e.Button == Button) IsLit = true;
return base.OnMouseDown(state, args); return base.OnMouseDown(e);
} }
protected override bool OnMouseUp(InputState state, MouseUpEventArgs args) protected override bool OnMouseUp(MouseUpEvent e)
{ {
if (args.Button == Button) IsLit = false; if (e.Button == Button) IsLit = false;
return base.OnMouseUp(state, args); return base.OnMouseUp(e);
} }
} }
} }

View File

@ -12,7 +12,7 @@ using osu.Framework.Configuration;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Cursor; using osu.Framework.Graphics.Cursor;
using osu.Framework.Input.States; using osu.Framework.Input.Events;
using osu.Framework.Logging; using osu.Framework.Logging;
using osu.Framework.Screens; using osu.Framework.Screens;
using osu.Framework.Threading; using osu.Framework.Threading;
@ -370,7 +370,7 @@ namespace osu.Game.Screens.Play
Content.FadeOut(fadeOutDuration); Content.FadeOut(fadeOutDuration);
} }
protected override bool OnScroll(InputState state) => mouseWheelDisabled.Value && !pauseContainer.IsPaused; protected override bool OnScroll(ScrollEvent e) => mouseWheelDisabled.Value && !pauseContainer.IsPaused;
private void initializeStoryboard(bool asyncLoad) private void initializeStoryboard(bool asyncLoad)
{ {

View File

@ -7,7 +7,7 @@ using osu.Framework.Allocation;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Sprites; using osu.Framework.Graphics.Sprites;
using osu.Framework.Input.States; using osu.Framework.Input.Events;
using osu.Framework.Localisation; using osu.Framework.Localisation;
using osu.Framework.Screens; using osu.Framework.Screens;
using osu.Framework.Threading; using osu.Framework.Threading;
@ -136,21 +136,21 @@ namespace osu.Game.Screens.Play
private bool readyForPush => player.LoadState == LoadState.Ready && IsHovered && GetContainingInputManager()?.DraggedDrawable == null; private bool readyForPush => player.LoadState == LoadState.Ready && IsHovered && GetContainingInputManager()?.DraggedDrawable == null;
protected override bool OnHover(InputState state) protected override bool OnHover(HoverEvent e)
{ {
// restore our screen defaults // restore our screen defaults
InitializeBackgroundElements(); InitializeBackgroundElements();
return base.OnHover(state); return base.OnHover(e);
} }
protected override void OnHoverLost(InputState state) protected override void OnHoverLost(HoverLostEvent e)
{ {
if (GetContainingInputManager().HoveredDrawables.Contains(visualSettings)) if (GetContainingInputManager().HoveredDrawables.Contains(visualSettings))
{ {
// show user setting preview // show user setting preview
UpdateBackgroundElements(); UpdateBackgroundElements();
} }
base.OnHoverLost(state); base.OnHoverLost(e);
} }
protected override void InitializeBackgroundElements() protected override void InitializeBackgroundElements()

View File

@ -5,8 +5,7 @@ using osu.Framework.Allocation;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Shapes;
using osu.Framework.Input.EventArgs; using osu.Framework.Input.Events;
using osu.Framework.Input.States;
using osu.Game.Graphics; using osu.Game.Graphics;
using osu.Game.Graphics.Sprites; using osu.Game.Graphics.Sprites;
using osu.Game.Graphics.UserInterface; using osu.Game.Graphics.UserInterface;
@ -137,16 +136,16 @@ namespace osu.Game.Screens.Play.PlayerSettings
this.Delay(600).FadeTo(inactive_alpha, fade_duration, Easing.OutQuint); this.Delay(600).FadeTo(inactive_alpha, fade_duration, Easing.OutQuint);
} }
protected override bool OnHover(InputState state) protected override bool OnHover(HoverEvent e)
{ {
this.FadeIn(fade_duration, Easing.OutQuint); this.FadeIn(fade_duration, Easing.OutQuint);
return true; return true;
} }
protected override void OnHoverLost(InputState state) protected override void OnHoverLost(HoverLostEvent e)
{ {
this.FadeTo(inactive_alpha, fade_duration, Easing.OutQuint); this.FadeTo(inactive_alpha, fade_duration, Easing.OutQuint);
base.OnHoverLost(state); base.OnHoverLost(e);
} }
[BackgroundDependencyLoader] [BackgroundDependencyLoader]
@ -161,6 +160,6 @@ namespace osu.Game.Screens.Play.PlayerSettings
protected override Container<Drawable> Content => content; protected override Container<Drawable> Content => content;
protected override bool OnMouseDown(InputState state, MouseDownEventArgs args) => true; protected override bool OnMouseDown(MouseDownEvent e) => true;
} }
} }

View File

@ -18,8 +18,7 @@ using OpenTK.Graphics;
using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Shapes;
using osu.Game.Graphics.Containers; using osu.Game.Graphics.Containers;
using osu.Framework.Input.Bindings; using osu.Framework.Input.Bindings;
using osu.Framework.Input.EventArgs; using osu.Framework.Input.Events;
using osu.Framework.Input.States;
using osu.Game.Input.Bindings; using osu.Game.Input.Bindings;
namespace osu.Game.Screens.Play 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); 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; fadeContainer.State = Visibility.Visible;
return base.OnMouseMove(state); return base.OnMouseMove(e);
} }
public bool OnPressed(GlobalAction action) public bool OnPressed(GlobalAction action)
@ -194,16 +193,16 @@ namespace osu.Game.Screens.Play
State = Visibility.Visible; State = Visibility.Visible;
} }
protected override bool OnMouseDown(InputState state, MouseDownEventArgs args) protected override bool OnMouseDown(MouseDownEvent e)
{ {
scheduledHide?.Cancel(); 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; 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); flow.TransformSpacingTo(new Vector2(5), 500, Easing.OutQuint);
box.FadeColour(colourHover, 500, Easing.OutQuint); box.FadeColour(colourHover, 500, Easing.OutQuint);
@ -292,27 +291,27 @@ namespace osu.Game.Screens.Play
return true; return true;
} }
protected override void OnHoverLost(InputState state) protected override void OnHoverLost(HoverLostEvent e)
{ {
flow.TransformSpacingTo(new Vector2(0), 500, Easing.OutQuint); flow.TransformSpacingTo(new Vector2(0), 500, Easing.OutQuint);
box.FadeColour(colourNormal, 500, Easing.OutQuint); box.FadeColour(colourNormal, 500, Easing.OutQuint);
background.FadeTo(0.2f, 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); 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); 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) if (!Enabled)
return false; return false;
@ -322,7 +321,7 @@ namespace osu.Game.Screens.Play
box.FlashColour(Color4.White, 500, Easing.OutQuint); box.FlashColour(Color4.White, 500, Easing.OutQuint);
aspect.ScaleTo(1.2f, 2000, 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. // 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). // this will likely need to be contextual in the future (bound from external components).

View File

@ -17,8 +17,7 @@ using osu.Framework.Caching;
using osu.Framework.Threading; using osu.Framework.Threading;
using osu.Framework.Configuration; using osu.Framework.Configuration;
using osu.Framework.Extensions.IEnumerableExtensions; using osu.Framework.Extensions.IEnumerableExtensions;
using osu.Framework.Input.EventArgs; using osu.Framework.Input.Events;
using osu.Framework.Input.States;
using osu.Game.Beatmaps; using osu.Game.Beatmaps;
using osu.Game.Graphics.Containers; using osu.Game.Graphics.Containers;
using osu.Game.Graphics.Cursor; using osu.Game.Graphics.Cursor;
@ -381,12 +380,12 @@ namespace osu.Game.Screens.Select
public void ScrollToSelected() => scrollPositionCache.Invalidate(); public void ScrollToSelected() => scrollPositionCache.Invalidate();
protected override bool OnKeyDown(InputState state, KeyDownEventArgs args) protected override bool OnKeyDown(KeyDownEvent e)
{ {
int direction = 0; int direction = 0;
bool skipDifficulties = false; bool skipDifficulties = false;
switch (args.Key) switch (e.Key)
{ {
case Key.Up: case Key.Up:
direction = -1; direction = -1;
@ -405,7 +404,7 @@ namespace osu.Game.Screens.Select
} }
if (direction == 0) if (direction == 0)
return base.OnKeyDown(state, args); return base.OnKeyDown(e);
SelectNext(direction, skipDifficulties); SelectNext(direction, skipDifficulties);
return true; return true;

View File

@ -10,7 +10,7 @@ using osu.Framework.Graphics.Cursor;
using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Shapes;
using osu.Framework.Graphics.Sprites; using osu.Framework.Graphics.Sprites;
using osu.Framework.Graphics.UserInterface; using osu.Framework.Graphics.UserInterface;
using osu.Framework.Input.States; using osu.Framework.Input.Events;
using osu.Game.Beatmaps; using osu.Game.Beatmaps;
using osu.Game.Beatmaps.Drawables; using osu.Game.Beatmaps.Drawables;
using osu.Game.Graphics; using osu.Game.Graphics;
@ -155,12 +155,12 @@ namespace osu.Game.Screens.Select.Carousel
triangles.Colour = OsuColour.Gray(0.5f); triangles.Colour = OsuColour.Gray(0.5f);
} }
protected override bool OnClick(InputState state) protected override bool OnClick(ClickEvent e)
{ {
if (Item.State == CarouselItemState.Selected) if (Item.State == CarouselItemState.Selected)
startRequested?.Invoke(beatmap); startRequested?.Invoke(beatmap);
return base.OnClick(state); return base.OnClick(e);
} }
protected override void ApplyState() protected override void ApplyState()

Some files were not shown because too many files have changed in this diff Show More