mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 13:23:22 +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
|
||||
{
|
||||
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<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.Plus }, GlobalAction.IncreaseScrollSpeed),
|
||||
new KeyBinding(new[] { InputKey.Control, InputKey.Minus }, GlobalAction.DecreaseScrollSpeed),
|
||||
new KeyBinding(InputKey.I, GlobalAction.ToggleInGameInterface),
|
||||
new KeyBinding(InputKey.MouseMiddle, GlobalAction.PauseGameplay),
|
||||
new KeyBinding(InputKey.Space, GlobalAction.TogglePauseReplay),
|
||||
new KeyBinding(InputKey.Control, GlobalAction.HoldForHUD),
|
||||
@ -145,6 +146,9 @@ namespace osu.Game.Input.Bindings
|
||||
[Description("Decrease scroll speed")]
|
||||
DecreaseScrollSpeed,
|
||||
|
||||
[Description("Toggle in-game interface")]
|
||||
ToggleInGameInterface,
|
||||
|
||||
[Description("Select")]
|
||||
Select,
|
||||
|
||||
|
@ -282,20 +282,7 @@ namespace osu.Game.Screens.Play
|
||||
switch (e.Key)
|
||||
{
|
||||
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;
|
||||
}
|
||||
@ -377,6 +364,24 @@ namespace osu.Game.Screens.Play
|
||||
holdingForHUD = true;
|
||||
updateVisibility();
|
||||
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;
|
||||
|
Loading…
Reference in New Issue
Block a user