From 1acc02405e9cda5f4d419451ab754b05be86f498 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Dach?= Date: Wed, 11 Oct 2023 08:18:48 +0200 Subject: [PATCH] Reorder `KeyBindingRow` members --- .../Settings/Sections/Input/KeyBindingRow.cs | 50 ++++++++++--------- 1 file changed, 26 insertions(+), 24 deletions(-) diff --git a/osu.Game/Overlays/Settings/Sections/Input/KeyBindingRow.cs b/osu.Game/Overlays/Settings/Sections/Input/KeyBindingRow.cs index 1e2283b58b..8fcf519a2e 100644 --- a/osu.Game/Overlays/Settings/Sections/Input/KeyBindingRow.cs +++ b/osu.Game/Overlays/Settings/Sections/Input/KeyBindingRow.cs @@ -39,14 +39,11 @@ namespace osu.Game.Overlays.Settings.Sections.Input /// public Action BindingUpdated { get; set; } - private readonly object action; - private readonly IEnumerable bindings; + public bool AllowMainMouseButtons; - private const float transition_time = 150; + public IEnumerable Defaults; - private const float height = 20; - - private const float padding = 5; + #region IFilterable private bool matchingFilter; @@ -60,23 +57,39 @@ namespace osu.Game.Overlays.Settings.Sections.Input } } - private Container content; - - public override bool ReceivePositionalInputAt(Vector2 screenSpacePos) => - content.ReceivePositionalInputAt(screenSpacePos); - public bool FilteringActive { get; set; } + public IEnumerable FilterTerms => bindings.Select(b => (LocalisableString)keyCombinationProvider.GetReadableString(b.KeyCombination)).Prepend(text.Text); + + #endregion + + private readonly object action; + private readonly IEnumerable bindings; + + private Bindable isDefault { get; } = new BindableBool(true); + [Resolved] private ReadableKeyCombinationProvider keyCombinationProvider { get; set; } + [Resolved] + private RealmAccess realm { get; set; } + + private Container content; + private OsuSpriteText text; private FillFlowContainer cancelAndClearButtons; private FillFlowContainer buttons; - private Bindable isDefault { get; } = new BindableBool(true); + private KeyButton bindTarget; - public IEnumerable FilterTerms => bindings.Select(b => (LocalisableString)keyCombinationProvider.GetReadableString(b.KeyCombination)).Prepend(text.Text); + private const float transition_time = 150; + private const float height = 20; + private const float padding = 5; + + public override bool ReceivePositionalInputAt(Vector2 screenSpacePos) => + content.ReceivePositionalInputAt(screenSpacePos); + + public override bool AcceptsFocus => bindTarget == null; public KeyBindingRow(object action, List bindings) { @@ -87,9 +100,6 @@ namespace osu.Game.Overlays.Settings.Sections.Input AutoSizeAxes = Axes.Y; } - [Resolved] - private RealmAccess realm { get; set; } - [BackgroundDependencyLoader] private void load(OverlayColourProvider colourProvider) { @@ -205,14 +215,6 @@ namespace osu.Game.Overlays.Settings.Sections.Input base.OnHoverLost(e); } - public override bool AcceptsFocus => bindTarget == null; - - private KeyButton bindTarget; - - public bool AllowMainMouseButtons; - - public IEnumerable Defaults; - private bool isModifier(Key k) => k < Key.F1; protected override bool OnClick(ClickEvent e) => true;