mirror of
https://github.com/ppy/osu.git
synced 2025-01-26 18:03:11 +08:00
add keybind for in game overlay
This commit is contained in:
parent
2bbb387208
commit
3994cf082d
@ -184,7 +184,7 @@ namespace osu.Game.Configuration
|
|||||||
return new TrackedSettings
|
return new TrackedSettings
|
||||||
{
|
{
|
||||||
new TrackedSetting<bool>(OsuSetting.MouseDisableButtons, v => new SettingDescription(!v, "gameplay mouse buttons", v ? "disabled" : "enabled", LookupKeyBindings(GlobalAction.ToggleGameplayMouseButtons))),
|
new TrackedSetting<bool>(OsuSetting.MouseDisableButtons, v => new SettingDescription(!v, "gameplay mouse buttons", v ? "disabled" : "enabled", LookupKeyBindings(GlobalAction.ToggleGameplayMouseButtons))),
|
||||||
new TrackedSetting<HUDVisibilityMode>(OsuSetting.HUDVisibilityMode, m => new SettingDescription(m, "HUD Visibility", m.GetDescription(), $"cycle: shift-tab quick view: {LookupKeyBindings(GlobalAction.HoldForHUD)}")),
|
new TrackedSetting<HUDVisibilityMode>(OsuSetting.HUDVisibilityMode, m => new SettingDescription(m, "HUD Visibility", m.GetDescription(), $"cycle: {LookupKeyBindings(GlobalAction.ToggleInGameInterface)} quick view: {LookupKeyBindings(GlobalAction.HoldForHUD)}")),
|
||||||
new TrackedSetting<ScalingMode>(OsuSetting.Scaling, m => new SettingDescription(m, "scaling", m.GetDescription())),
|
new TrackedSetting<ScalingMode>(OsuSetting.Scaling, m => new SettingDescription(m, "scaling", m.GetDescription())),
|
||||||
new TrackedSetting<int>(OsuSetting.Skin, m =>
|
new TrackedSetting<int>(OsuSetting.Skin, m =>
|
||||||
{
|
{
|
||||||
|
@ -68,6 +68,7 @@ namespace osu.Game.Input.Bindings
|
|||||||
new KeyBinding(new[] { InputKey.Control, InputKey.Tilde }, GlobalAction.QuickExit),
|
new KeyBinding(new[] { InputKey.Control, InputKey.Tilde }, GlobalAction.QuickExit),
|
||||||
new KeyBinding(new[] { InputKey.Control, InputKey.Plus }, GlobalAction.IncreaseScrollSpeed),
|
new KeyBinding(new[] { InputKey.Control, InputKey.Plus }, GlobalAction.IncreaseScrollSpeed),
|
||||||
new KeyBinding(new[] { InputKey.Control, InputKey.Minus }, GlobalAction.DecreaseScrollSpeed),
|
new KeyBinding(new[] { InputKey.Control, InputKey.Minus }, GlobalAction.DecreaseScrollSpeed),
|
||||||
|
new KeyBinding(InputKey.I, GlobalAction.ToggleInGameInterface),
|
||||||
new KeyBinding(InputKey.MouseMiddle, GlobalAction.PauseGameplay),
|
new KeyBinding(InputKey.MouseMiddle, GlobalAction.PauseGameplay),
|
||||||
new KeyBinding(InputKey.Space, GlobalAction.TogglePauseReplay),
|
new KeyBinding(InputKey.Space, GlobalAction.TogglePauseReplay),
|
||||||
new KeyBinding(InputKey.Control, GlobalAction.HoldForHUD),
|
new KeyBinding(InputKey.Control, GlobalAction.HoldForHUD),
|
||||||
@ -145,6 +146,9 @@ namespace osu.Game.Input.Bindings
|
|||||||
[Description("Decrease scroll speed")]
|
[Description("Decrease scroll speed")]
|
||||||
DecreaseScrollSpeed,
|
DecreaseScrollSpeed,
|
||||||
|
|
||||||
|
[Description("Toggle in-game interface")]
|
||||||
|
ToggleInGameInterface,
|
||||||
|
|
||||||
[Description("Select")]
|
[Description("Select")]
|
||||||
Select,
|
Select,
|
||||||
|
|
||||||
|
@ -282,20 +282,7 @@ namespace osu.Game.Screens.Play
|
|||||||
switch (e.Key)
|
switch (e.Key)
|
||||||
{
|
{
|
||||||
case Key.Tab:
|
case Key.Tab:
|
||||||
switch (configVisibilityMode.Value)
|
|
||||||
{
|
|
||||||
case HUDVisibilityMode.Never:
|
|
||||||
configVisibilityMode.Value = HUDVisibilityMode.HideDuringGameplay;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case HUDVisibilityMode.HideDuringGameplay:
|
|
||||||
configVisibilityMode.Value = HUDVisibilityMode.Always;
|
|
||||||
break;
|
|
||||||
|
|
||||||
case HUDVisibilityMode.Always:
|
|
||||||
configVisibilityMode.Value = HUDVisibilityMode.Never;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@ -377,6 +364,24 @@ namespace osu.Game.Screens.Play
|
|||||||
holdingForHUD = true;
|
holdingForHUD = true;
|
||||||
updateVisibility();
|
updateVisibility();
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
case GlobalAction.ToggleInGameInterface:
|
||||||
|
switch (configVisibilityMode.Value)
|
||||||
|
{
|
||||||
|
case HUDVisibilityMode.Never:
|
||||||
|
configVisibilityMode.Value = HUDVisibilityMode.HideDuringGameplay;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case HUDVisibilityMode.HideDuringGameplay:
|
||||||
|
configVisibilityMode.Value = HUDVisibilityMode.Always;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case HUDVisibilityMode.Always:
|
||||||
|
configVisibilityMode.Value = HUDVisibilityMode.Never;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
updateVisibility();
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
Loading…
Reference in New Issue
Block a user