mirror of
https://github.com/osukey/osukey.git
synced 2025-06-05 21:07:18 +09:00
Rename OsuAction to GlobalAction
This commit is contained in:
parent
6ba5bdf1e6
commit
c82db54fb5
@ -5,7 +5,7 @@ using System.ComponentModel;
|
|||||||
|
|
||||||
namespace osu.Game.Input
|
namespace osu.Game.Input
|
||||||
{
|
{
|
||||||
public enum OsuAction
|
public enum GlobalAction
|
||||||
{
|
{
|
||||||
[Description("Toggle chat overlay")]
|
[Description("Toggle chat overlay")]
|
||||||
ToggleChat,
|
ToggleChat,
|
@ -6,16 +6,16 @@ using System.Collections.Generic;
|
|||||||
|
|
||||||
namespace osu.Game.Input
|
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.F8, GlobalAction.ToggleChat },
|
||||||
{ Key.F9, OsuAction.ToggleSocial },
|
{ Key.F9, GlobalAction.ToggleSocial },
|
||||||
{ new[] { Key.LControl, Key.LAlt, Key.R }, OsuAction.ResetInputSettings },
|
{ new[] { Key.LControl, Key.LAlt, Key.R }, GlobalAction.ResetInputSettings },
|
||||||
{ new[] { Key.LControl, Key.T }, OsuAction.ToggleToolbar },
|
{ new[] { Key.LControl, Key.T }, GlobalAction.ToggleToolbar },
|
||||||
{ new[] { Key.LControl, Key.O }, OsuAction.ToggleSettings },
|
{ new[] { Key.LControl, Key.O }, GlobalAction.ToggleSettings },
|
||||||
{ new[] { Key.LControl, Key.D }, OsuAction.ToggleDirect },
|
{ new[] { Key.LControl, Key.D }, GlobalAction.ToggleDirect },
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -255,17 +255,17 @@ namespace osu.Game
|
|||||||
{
|
{
|
||||||
if (args.Repeat || intro == null) return false;
|
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();
|
chat.ToggleVisibility();
|
||||||
return true;
|
return true;
|
||||||
case OsuAction.ToggleSocial:
|
case GlobalAction.ToggleSocial:
|
||||||
social.ToggleVisibility();
|
social.ToggleVisibility();
|
||||||
return true;
|
return true;
|
||||||
case OsuAction.ResetInputSettings:
|
case GlobalAction.ResetInputSettings:
|
||||||
var sensitivity = frameworkConfig.GetBindable<double>(FrameworkSetting.CursorSensitivity);
|
var sensitivity = frameworkConfig.GetBindable<double>(FrameworkSetting.CursorSensitivity);
|
||||||
|
|
||||||
sensitivity.Disabled = false;
|
sensitivity.Disabled = false;
|
||||||
@ -274,13 +274,13 @@ namespace osu.Game
|
|||||||
|
|
||||||
frameworkConfig.Set(FrameworkSetting.ActiveInputHandlers, string.Empty);
|
frameworkConfig.Set(FrameworkSetting.ActiveInputHandlers, string.Empty);
|
||||||
return true;
|
return true;
|
||||||
case OsuAction.ToggleToolbar:
|
case GlobalAction.ToggleToolbar:
|
||||||
Toolbar.ToggleVisibility();
|
Toolbar.ToggleVisibility();
|
||||||
return true;
|
return true;
|
||||||
case OsuAction.ToggleSettings:
|
case GlobalAction.ToggleSettings:
|
||||||
settings.ToggleVisibility();
|
settings.ToggleVisibility();
|
||||||
return true;
|
return true;
|
||||||
case OsuAction.ToggleDirect:
|
case GlobalAction.ToggleDirect:
|
||||||
direct.ToggleVisibility();
|
direct.ToggleVisibility();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -95,7 +95,7 @@
|
|||||||
<Compile Include="Input\Binding.cs" />
|
<Compile Include="Input\Binding.cs" />
|
||||||
<Compile Include="Input\BindingStore.cs" />
|
<Compile Include="Input\BindingStore.cs" />
|
||||||
<Compile Include="Input\KeyCombination.cs" />
|
<Compile Include="Input\KeyCombination.cs" />
|
||||||
<Compile Include="Input\OsuAction.cs" />
|
<Compile Include="Input\GlobalAction.cs" />
|
||||||
<Compile Include="Input\GlobalActionMappingInputManager.cs" />
|
<Compile Include="Input\GlobalActionMappingInputManager.cs" />
|
||||||
<Compile Include="IO\FileStore.cs" />
|
<Compile Include="IO\FileStore.cs" />
|
||||||
<Compile Include="IO\FileInfo.cs" />
|
<Compile Include="IO\FileInfo.cs" />
|
||||||
|
Loading…
x
Reference in New Issue
Block a user