From c82db54fb5f1cd8313ec894c726d3574686af5cf Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Thu, 10 Aug 2017 17:22:08 +0900 Subject: [PATCH] Rename OsuAction to GlobalAction --- osu.Game/Input/{OsuAction.cs => GlobalAction.cs} | 2 +- .../Input/GlobalActionMappingInputManager.cs | 16 ++++++++-------- osu.Game/OsuGame.cs | 16 ++++++++-------- osu.Game/osu.Game.csproj | 2 +- 4 files changed, 18 insertions(+), 18 deletions(-) rename osu.Game/Input/{OsuAction.cs => GlobalAction.cs} (92%) diff --git a/osu.Game/Input/OsuAction.cs b/osu.Game/Input/GlobalAction.cs similarity index 92% rename from osu.Game/Input/OsuAction.cs rename to osu.Game/Input/GlobalAction.cs index a0c203e3ec..c15773b888 100644 --- a/osu.Game/Input/OsuAction.cs +++ b/osu.Game/Input/GlobalAction.cs @@ -5,7 +5,7 @@ using System.ComponentModel; namespace osu.Game.Input { - public enum OsuAction + public enum GlobalAction { [Description("Toggle chat overlay")] ToggleChat, diff --git a/osu.Game/Input/GlobalActionMappingInputManager.cs b/osu.Game/Input/GlobalActionMappingInputManager.cs index 250640422d..890872be04 100644 --- a/osu.Game/Input/GlobalActionMappingInputManager.cs +++ b/osu.Game/Input/GlobalActionMappingInputManager.cs @@ -6,16 +6,16 @@ using System.Collections.Generic; namespace osu.Game.Input { - public class GlobalActionMappingInputManager : ActionMappingInputManager + public class GlobalActionMappingInputManager : ActionMappingInputManager { - protected override IDictionary CreateDefaultMappings() => new Dictionary + protected override IDictionary CreateDefaultMappings() => new Dictionary { - { Key.F8, OsuAction.ToggleChat }, - { Key.F9, OsuAction.ToggleSocial }, - { new[] { Key.LControl, Key.LAlt, Key.R }, OsuAction.ResetInputSettings }, - { new[] { Key.LControl, Key.T }, OsuAction.ToggleToolbar }, - { new[] { Key.LControl, Key.O }, OsuAction.ToggleSettings }, - { new[] { Key.LControl, Key.D }, OsuAction.ToggleDirect }, + { Key.F8, GlobalAction.ToggleChat }, + { Key.F9, GlobalAction.ToggleSocial }, + { new[] { Key.LControl, Key.LAlt, Key.R }, GlobalAction.ResetInputSettings }, + { new[] { Key.LControl, Key.T }, GlobalAction.ToggleToolbar }, + { new[] { Key.LControl, Key.O }, GlobalAction.ToggleSettings }, + { new[] { Key.LControl, Key.D }, GlobalAction.ToggleDirect }, }; } } diff --git a/osu.Game/OsuGame.cs b/osu.Game/OsuGame.cs index d9321654f7..f84864596b 100644 --- a/osu.Game/OsuGame.cs +++ b/osu.Game/OsuGame.cs @@ -255,17 +255,17 @@ namespace osu.Game { if (args.Repeat || intro == null) return false; - if (state.Data is OsuAction) + if (state.Data is GlobalAction) { - switch ((OsuAction)state.Data) + switch ((GlobalAction)state.Data) { - case OsuAction.ToggleChat: + case GlobalAction.ToggleChat: chat.ToggleVisibility(); return true; - case OsuAction.ToggleSocial: + case GlobalAction.ToggleSocial: social.ToggleVisibility(); return true; - case OsuAction.ResetInputSettings: + case GlobalAction.ResetInputSettings: var sensitivity = frameworkConfig.GetBindable(FrameworkSetting.CursorSensitivity); sensitivity.Disabled = false; @@ -274,13 +274,13 @@ namespace osu.Game frameworkConfig.Set(FrameworkSetting.ActiveInputHandlers, string.Empty); return true; - case OsuAction.ToggleToolbar: + case GlobalAction.ToggleToolbar: Toolbar.ToggleVisibility(); return true; - case OsuAction.ToggleSettings: + case GlobalAction.ToggleSettings: settings.ToggleVisibility(); return true; - case OsuAction.ToggleDirect: + case GlobalAction.ToggleDirect: direct.ToggleVisibility(); return true; } diff --git a/osu.Game/osu.Game.csproj b/osu.Game/osu.Game.csproj index 6aff6734e0..9d849b9d67 100644 --- a/osu.Game/osu.Game.csproj +++ b/osu.Game/osu.Game.csproj @@ -95,7 +95,7 @@ - +