From 219bdbc4e16c7c47ebfeee75386a920c992285fb Mon Sep 17 00:00:00 2001 From: TocoToucan Date: Sat, 9 Dec 2017 22:21:17 +0300 Subject: [PATCH 1/4] 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 From 74d261ea112534b2d9fbde32bb98ebf49d49ee90 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Mon, 11 Dec 2017 13:54:27 +0900 Subject: [PATCH 2/4] Update framework --- osu-framework | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu-framework b/osu-framework index 00740e0185..0e4e653a33 160000 --- a/osu-framework +++ b/osu-framework @@ -1 +1 @@ -Subproject commit 00740e0185b9d828b67d6228d8e5d5bf0d49af94 +Subproject commit 0e4e653a33ced4acccac042b9b272d36f0f67e2b From ed81ed7c5431776f84dced2e97e89aaf8c05e7e4 Mon Sep 17 00:00:00 2001 From: smoogipoo Date: Mon, 11 Dec 2017 15:19:00 +0900 Subject: [PATCH 3/4] Add back HandleInput disable overrides --- .../Objects/Drawables/Pieces/SpinnerBackground.cs | 2 ++ osu.Game/Overlays/OnScreenDisplay.cs | 2 ++ osu.Game/Screens/Menu/LogoVisualisation.cs | 2 ++ osu.Game/Screens/Menu/MenuSideFlashes.cs | 2 ++ osu.Game/Screens/Play/SquareGraph.cs | 2 ++ osu.Game/Storyboards/Drawables/DrawableStoryboard.cs | 1 + 6 files changed, 11 insertions(+) diff --git a/osu.Game.Rulesets.Osu/Objects/Drawables/Pieces/SpinnerBackground.cs b/osu.Game.Rulesets.Osu/Objects/Drawables/Pieces/SpinnerBackground.cs index bc362a4872..bdd5b71211 100644 --- a/osu.Game.Rulesets.Osu/Objects/Drawables/Pieces/SpinnerBackground.cs +++ b/osu.Game.Rulesets.Osu/Objects/Drawables/Pieces/SpinnerBackground.cs @@ -11,6 +11,8 @@ 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/Overlays/OnScreenDisplay.cs b/osu.Game/Overlays/OnScreenDisplay.cs index 6866804827..dcab942522 100644 --- a/osu.Game/Overlays/OnScreenDisplay.cs +++ b/osu.Game/Overlays/OnScreenDisplay.cs @@ -21,6 +21,8 @@ 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/Screens/Menu/LogoVisualisation.cs b/osu.Game/Screens/Menu/LogoVisualisation.cs index 5573542e69..5b86fd6ca3 100644 --- a/osu.Game/Screens/Menu/LogoVisualisation.cs +++ b/osu.Game/Screens/Menu/LogoVisualisation.cs @@ -64,6 +64,8 @@ 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 4e057b2d95..9317780eac 100644 --- a/osu.Game/Screens/Menu/MenuSideFlashes.cs +++ b/osu.Game/Screens/Menu/MenuSideFlashes.cs @@ -19,6 +19,8 @@ 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/SquareGraph.cs b/osu.Game/Screens/Play/SquareGraph.cs index 00888d8db4..81dbf3eca4 100644 --- a/osu.Game/Screens/Play/SquareGraph.cs +++ b/osu.Game/Screens/Play/SquareGraph.cs @@ -21,6 +21,8 @@ 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 2230869213..5df88b342f 100644 --- a/osu.Game/Storyboards/Drawables/DrawableStoryboard.cs +++ b/osu.Game/Storyboards/Drawables/DrawableStoryboard.cs @@ -26,6 +26,7 @@ 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 From 738d27fd1cfbed042c5639d66a77e87e9d329b7d Mon Sep 17 00:00:00 2001 From: smoogipoo Date: Mon, 11 Dec 2017 15:21:12 +0900 Subject: [PATCH 4/4] Update framework --- osu-framework | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu-framework b/osu-framework index 0e4e653a33..8480ab5009 160000 --- a/osu-framework +++ b/osu-framework @@ -1 +1 @@ -Subproject commit 0e4e653a33ced4acccac042b9b272d36f0f67e2b +Subproject commit 8480ab5009b2b4a7810a817a12433959424d5339