diff --git a/osu-framework b/osu-framework index fc13a4c2f1..acb9bfb084 160000 --- a/osu-framework +++ b/osu-framework @@ -1 +1 @@ -Subproject commit fc13a4c2f1eff443ffe7d5ff3ca5caa17b98ffbf +Subproject commit acb9bfb084b5607ff31c6269cb7942fa02624b75 diff --git a/osu.Game/Input/Bindings/DatabasedKeyBindingInputManager.cs b/osu.Game/Input/Bindings/DatabasedKeyBindingInputManager.cs index e565c13b31..89aee7ca4d 100644 --- a/osu.Game/Input/Bindings/DatabasedKeyBindingInputManager.cs +++ b/osu.Game/Input/Bindings/DatabasedKeyBindingInputManager.cs @@ -21,7 +21,7 @@ namespace osu.Game.Input.Bindings private KeyBindingStore store; - public override IEnumerable DefaultMappings => ruleset.CreateInstance().GetDefaultKeyBindings(); + public override IEnumerable DefaultKeyBindings => ruleset.CreateInstance().GetDefaultKeyBindings(); /// /// Create a new instance. diff --git a/osu.Game/Input/Bindings/GlobalBindingInputManager.cs b/osu.Game/Input/Bindings/GlobalKeyBindingInputManager.cs similarity index 88% rename from osu.Game/Input/Bindings/GlobalBindingInputManager.cs rename to osu.Game/Input/Bindings/GlobalKeyBindingInputManager.cs index d00ed588ae..4dff25d509 100644 --- a/osu.Game/Input/Bindings/GlobalBindingInputManager.cs +++ b/osu.Game/Input/Bindings/GlobalKeyBindingInputManager.cs @@ -11,17 +11,17 @@ using osu.Framework.Input.Bindings; namespace osu.Game.Input.Bindings { - public class GlobalBindingInputManager : DatabasedKeyBindingInputManager + public class GlobalKeyBindingInputManager : DatabasedKeyBindingInputManager { private readonly Drawable handler; - public GlobalBindingInputManager(OsuGameBase game) + public GlobalKeyBindingInputManager(OsuGameBase game) { if (game is IKeyBindingHandler) handler = game; } - public override IEnumerable DefaultMappings => new[] + public override IEnumerable DefaultKeyBindings => new[] { new KeyBinding(Key.F8, GlobalAction.ToggleChat), new KeyBinding(Key.F9, GlobalAction.ToggleSocial), diff --git a/osu.Game/Input/KeyBindingStore.cs b/osu.Game/Input/KeyBindingStore.cs index 95fdaba339..f50acb4802 100644 --- a/osu.Game/Input/KeyBindingStore.cs +++ b/osu.Game/Input/KeyBindingStore.cs @@ -26,7 +26,7 @@ namespace osu.Game.Input } } - public void Register(KeyBindingInputManager manager) => insertDefaults(manager.DefaultMappings); + public void Register(KeyBindingInputManager manager) => insertDefaults(manager.DefaultKeyBindings); protected override int StoreVersion => 3; @@ -51,9 +51,7 @@ namespace osu.Game.Input protected override void Prepare(bool reset = false) { if (reset) - { Connection.DropTable(); - } Connection.CreateTable(); } @@ -90,9 +88,6 @@ namespace osu.Game.Input public IEnumerable Query(int? rulesetId = null, int? variant = null) => Query(b => b.RulesetID == rulesetId && b.Variant == variant); - public void Update(KeyBinding keyBinding) - { - Connection.Update(keyBinding); - } + public void Update(KeyBinding keyBinding) => Connection.Update(keyBinding); } } diff --git a/osu.Game/OsuGameBase.cs b/osu.Game/OsuGameBase.cs index 571c75022e..a5600d1ef7 100644 --- a/osu.Game/OsuGameBase.cs +++ b/osu.Game/OsuGameBase.cs @@ -183,14 +183,14 @@ namespace osu.Game { base.LoadComplete(); - GlobalBindingInputManager globalBinding; + GlobalKeyBindingInputManager globalBinding; base.Content.Add(new RatioAdjust { Children = new Drawable[] { Cursor = new MenuCursor(), - globalBinding = new GlobalBindingInputManager(this) + globalBinding = new GlobalKeyBindingInputManager(this) { RelativeSizeAxes = Axes.Both, Child = new OsuTooltipContainer(Cursor) diff --git a/osu.Game/Overlays/KeyBinding/GlobalBindingsSection.cs b/osu.Game/Overlays/KeyBinding/GlobalKeyBindingsSection.cs similarity index 68% rename from osu.Game/Overlays/KeyBinding/GlobalBindingsSection.cs rename to osu.Game/Overlays/KeyBinding/GlobalKeyBindingsSection.cs index 943fc4a416..7dd9919e5d 100644 --- a/osu.Game/Overlays/KeyBinding/GlobalBindingsSection.cs +++ b/osu.Game/Overlays/KeyBinding/GlobalKeyBindingsSection.cs @@ -6,18 +6,18 @@ using osu.Game.Graphics; namespace osu.Game.Overlays.KeyBinding { - public class GlobalBindingsSection : KeyBindingsSection + public class GlobalKeyBindingsSection : KeyBindingsSection { private readonly string name; public override FontAwesome Icon => FontAwesome.fa_osu_mod_nofail; public override string Header => name; - public GlobalBindingsSection(KeyBindingInputManager manager, string name) + public GlobalKeyBindingsSection(KeyBindingInputManager manager, string name) { this.name = name; - Defaults = manager.DefaultMappings; + Defaults = manager.DefaultKeyBindings; } } } \ No newline at end of file diff --git a/osu.Game/Overlays/KeyBinding/KeyBindingRow.cs b/osu.Game/Overlays/KeyBinding/KeyBindingRow.cs index 4cc179aaf1..082e1c0eec 100644 --- a/osu.Game/Overlays/KeyBinding/KeyBindingRow.cs +++ b/osu.Game/Overlays/KeyBinding/KeyBindingRow.cs @@ -219,7 +219,8 @@ namespace osu.Game.Overlays.KeyBinding Margin = new MarginPadding(padding); - //var isDefault = keyBinding.Action is Enum; + // todo: use this in a meaningful way + // var isDefault = keyBinding.Action is Enum; Masking = true; CornerRadius = padding; diff --git a/osu.Game/Overlays/KeyBindingOverlay.cs b/osu.Game/Overlays/KeyBindingOverlay.cs index e5061def77..ba45b3c812 100644 --- a/osu.Game/Overlays/KeyBindingOverlay.cs +++ b/osu.Game/Overlays/KeyBindingOverlay.cs @@ -15,9 +15,9 @@ namespace osu.Game.Overlays protected override Drawable CreateHeader() => new SettingsHeader("key configuration", "Customise your keys!"); [BackgroundDependencyLoader(permitNulls: true)] - private void load(RulesetStore rulesets, GlobalBindingInputManager global) + private void load(RulesetStore rulesets, GlobalKeyBindingInputManager global) { - AddSection(new GlobalBindingsSection(global, "Global")); + AddSection(new GlobalKeyBindingsSection(global, "Global")); foreach (var ruleset in rulesets.Query()) AddSection(new RulesetBindingsSection(ruleset)); diff --git a/osu.Game/osu.Game.csproj b/osu.Game/osu.Game.csproj index f21ce528ca..07ab58bffc 100644 --- a/osu.Game/osu.Game.csproj +++ b/osu.Game/osu.Game.csproj @@ -95,14 +95,14 @@ - + - +