From 219bdbc4e16c7c47ebfeee75386a920c992285fb Mon Sep 17 00:00:00 2001 From: TocoToucan Date: Sat, 9 Dec 2017 22:21:17 +0300 Subject: [PATCH] Populate HandleInput automatically --- .../Objects/Drawables/Pieces/SpinnerBackground.cs | 2 -- osu.Game.Rulesets.Osu/UI/Cursor/CursorTrail.cs | 2 -- osu.Game/Overlays/OnScreenDisplay.cs | 2 -- osu.Game/Overlays/Settings/SettingsItem.cs | 2 -- osu.Game/Screens/Menu/LogoVisualisation.cs | 2 -- osu.Game/Screens/Menu/MenuSideFlashes.cs | 2 -- osu.Game/Screens/Play/HUD/ReplaySettingsOverlay.cs | 4 +--- osu.Game/Screens/Play/KeyCounterCollection.cs | 2 -- osu.Game/Screens/Play/SquareGraph.cs | 2 -- osu.Game/Storyboards/Drawables/DrawableStoryboard.cs | 1 - 10 files changed, 1 insertion(+), 20 deletions(-) diff --git a/osu.Game.Rulesets.Osu/Objects/Drawables/Pieces/SpinnerBackground.cs b/osu.Game.Rulesets.Osu/Objects/Drawables/Pieces/SpinnerBackground.cs index bdd5b71211..bc362a4872 100644 --- a/osu.Game.Rulesets.Osu/Objects/Drawables/Pieces/SpinnerBackground.cs +++ b/osu.Game.Rulesets.Osu/Objects/Drawables/Pieces/SpinnerBackground.cs @@ -11,8 +11,6 @@ namespace osu.Game.Rulesets.Osu.Objects.Drawables.Pieces { public class SpinnerBackground : CircularContainer, IHasAccentColour { - public override bool HandleInput => false; - protected Box Disc; public Color4 AccentColour diff --git a/osu.Game.Rulesets.Osu/UI/Cursor/CursorTrail.cs b/osu.Game.Rulesets.Osu/UI/Cursor/CursorTrail.cs index a5be6a7952..90c9e8df2c 100644 --- a/osu.Game.Rulesets.Osu/UI/Cursor/CursorTrail.cs +++ b/osu.Game.Rulesets.Osu/UI/Cursor/CursorTrail.cs @@ -20,8 +20,6 @@ namespace osu.Game.Rulesets.Osu.UI.Cursor { internal class CursorTrail : Drawable { - public override bool HandleInput => true; - private int currentIndex; private Shader shader; diff --git a/osu.Game/Overlays/OnScreenDisplay.cs b/osu.Game/Overlays/OnScreenDisplay.cs index dcab942522..6866804827 100644 --- a/osu.Game/Overlays/OnScreenDisplay.cs +++ b/osu.Game/Overlays/OnScreenDisplay.cs @@ -21,8 +21,6 @@ namespace osu.Game.Overlays { private readonly Container box; - public override bool HandleInput => false; - private readonly SpriteText textLine1; private readonly SpriteText textLine2; private readonly SpriteText textLine3; diff --git a/osu.Game/Overlays/Settings/SettingsItem.cs b/osu.Game/Overlays/Settings/SettingsItem.cs index d9aac58c54..da50c2b444 100644 --- a/osu.Game/Overlays/Settings/SettingsItem.cs +++ b/osu.Game/Overlays/Settings/SettingsItem.cs @@ -159,8 +159,6 @@ namespace osu.Game.Overlays.Settings public string TooltipText => "Revert to default"; - public override bool HandleInput => true; - protected override bool OnMouseDown(InputState state, MouseDownEventArgs args) => true; protected override bool OnMouseUp(InputState state, MouseUpEventArgs args) => true; diff --git a/osu.Game/Screens/Menu/LogoVisualisation.cs b/osu.Game/Screens/Menu/LogoVisualisation.cs index 5b86fd6ca3..5573542e69 100644 --- a/osu.Game/Screens/Menu/LogoVisualisation.cs +++ b/osu.Game/Screens/Menu/LogoVisualisation.cs @@ -64,8 +64,6 @@ namespace osu.Game.Screens.Menu private readonly float[] frequencyAmplitudes = new float[256]; - public override bool HandleInput => false; - private Shader shader; private readonly Texture texture; diff --git a/osu.Game/Screens/Menu/MenuSideFlashes.cs b/osu.Game/Screens/Menu/MenuSideFlashes.cs index 9317780eac..4e057b2d95 100644 --- a/osu.Game/Screens/Menu/MenuSideFlashes.cs +++ b/osu.Game/Screens/Menu/MenuSideFlashes.cs @@ -19,8 +19,6 @@ namespace osu.Game.Screens.Menu { public class MenuSideFlashes : BeatSyncedContainer { - public override bool HandleInput => false; - private readonly Bindable beatmap = new Bindable(); private readonly Box leftBox; diff --git a/osu.Game/Screens/Play/HUD/ReplaySettingsOverlay.cs b/osu.Game/Screens/Play/HUD/ReplaySettingsOverlay.cs index e44a738d55..c07eebdef8 100644 --- a/osu.Game/Screens/Play/HUD/ReplaySettingsOverlay.cs +++ b/osu.Game/Screens/Play/HUD/ReplaySettingsOverlay.cs @@ -16,8 +16,6 @@ namespace osu.Game.Screens.Play.HUD public bool ReplayLoaded; - public override bool HandleInput => true; - public readonly PlaybackSettings PlaybackSettings; //public readonly CollectionSettings CollectionSettings; //public readonly DiscussionSettings DiscussionSettings; @@ -35,7 +33,7 @@ namespace osu.Game.Screens.Play.HUD Direction = FillDirection.Vertical, Spacing = new Vector2(0, 20), Margin = new MarginPadding { Top = 100, Right = 10 }, - Children = new [] + Children = new[] { //CollectionSettings = new CollectionSettings(), //DiscussionSettings = new DiscussionSettings(), diff --git a/osu.Game/Screens/Play/KeyCounterCollection.cs b/osu.Game/Screens/Play/KeyCounterCollection.cs index d21be71785..2f077f5c0a 100644 --- a/osu.Game/Screens/Play/KeyCounterCollection.cs +++ b/osu.Game/Screens/Play/KeyCounterCollection.cs @@ -141,8 +141,6 @@ namespace osu.Game.Screens.Play public override bool ReceiveMouseInputAt(Vector2 screenSpacePos) => true; - public override bool HandleInput => true; - protected override bool OnKeyDown(InputState state, KeyDownEventArgs args) => Target.Children.Any(c => c.TriggerOnKeyDown(state, args)); protected override bool OnKeyUp(InputState state, KeyUpEventArgs args) => Target.Children.Any(c => c.TriggerOnKeyUp(state, args)); diff --git a/osu.Game/Screens/Play/SquareGraph.cs b/osu.Game/Screens/Play/SquareGraph.cs index 81dbf3eca4..00888d8db4 100644 --- a/osu.Game/Screens/Play/SquareGraph.cs +++ b/osu.Game/Screens/Play/SquareGraph.cs @@ -21,8 +21,6 @@ namespace osu.Game.Screens.Play public int ColumnCount => columns.Length; - public override bool HandleInput => false; - private int progress; public int Progress { diff --git a/osu.Game/Storyboards/Drawables/DrawableStoryboard.cs b/osu.Game/Storyboards/Drawables/DrawableStoryboard.cs index 5df88b342f..2230869213 100644 --- a/osu.Game/Storyboards/Drawables/DrawableStoryboard.cs +++ b/osu.Game/Storyboards/Drawables/DrawableStoryboard.cs @@ -26,7 +26,6 @@ namespace osu.Game.Storyboards.Drawables protected override Container Content => content; protected override Vector2 DrawScale => new Vector2(Parent.DrawHeight / 480); - public override bool HandleInput => false; private bool passing = true; public bool Passing