1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-23 05:47:19 +08:00

Rename OsuAction to GlobalAction

This commit is contained in:
Dean Herbert 2017-08-10 17:22:08 +09:00
parent 6ba5bdf1e6
commit c82db54fb5
4 changed files with 18 additions and 18 deletions

View File

@ -5,7 +5,7 @@ using System.ComponentModel;
namespace osu.Game.Input
{
public enum OsuAction
public enum GlobalAction
{
[Description("Toggle chat overlay")]
ToggleChat,

View File

@ -6,16 +6,16 @@ using System.Collections.Generic;
namespace osu.Game.Input
{
public class GlobalActionMappingInputManager : ActionMappingInputManager<OsuAction>
public class GlobalActionMappingInputManager : ActionMappingInputManager<GlobalAction>
{
protected override IDictionary<KeyCombination, OsuAction> CreateDefaultMappings() => new Dictionary<KeyCombination, OsuAction>
protected override IDictionary<KeyCombination, GlobalAction> CreateDefaultMappings() => new Dictionary<KeyCombination, GlobalAction>
{
{ 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 },
};
}
}

View File

@ -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<double>(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;
}

View File

@ -95,7 +95,7 @@
<Compile Include="Input\Binding.cs" />
<Compile Include="Input\BindingStore.cs" />
<Compile Include="Input\KeyCombination.cs" />
<Compile Include="Input\OsuAction.cs" />
<Compile Include="Input\GlobalAction.cs" />
<Compile Include="Input\GlobalActionMappingInputManager.cs" />
<Compile Include="IO\FileStore.cs" />
<Compile Include="IO\FileInfo.cs" />