mirror of
https://github.com/ppy/osu
synced 2025-03-05 10:58:34 +00:00
Merge pull request #10620 from peppy/tracked-hud-visibility-settings
Change shift-tab to cycle between available HUD visibility modes
This commit is contained in:
commit
fb6c88d39f
@ -89,7 +89,7 @@ namespace osu.Game.Tests.Visual.Gameplay
|
||||
[Test]
|
||||
public void TestExternalHideDoesntAffectConfig()
|
||||
{
|
||||
HUDVisibilityMode originalConfigValue = HUDVisibilityMode.HideDuringBreaks;
|
||||
HUDVisibilityMode originalConfigValue = HUDVisibilityMode.HideDuringGameplay;
|
||||
|
||||
createNew();
|
||||
|
||||
|
@ -12,9 +12,6 @@ namespace osu.Game.Configuration
|
||||
[Description("Hide during gameplay")]
|
||||
HideDuringGameplay,
|
||||
|
||||
[Description("Hide during breaks")]
|
||||
HideDuringBreaks,
|
||||
|
||||
Always
|
||||
}
|
||||
}
|
||||
|
@ -170,6 +170,7 @@ namespace osu.Game.Configuration
|
||||
public override TrackedSettings CreateTrackedSettings() => new TrackedSettings
|
||||
{
|
||||
new TrackedSetting<bool>(OsuSetting.MouseDisableButtons, v => new SettingDescription(!v, "gameplay mouse buttons", v ? "disabled" : "enabled")),
|
||||
new TrackedSetting<HUDVisibilityMode>(OsuSetting.HUDVisibilityMode, m => new SettingDescription(m, "HUD Visibility", m.GetDescription())),
|
||||
new TrackedSetting<ScalingMode>(OsuSetting.Scaling, m => new SettingDescription(m, "scaling", m.GetDescription())),
|
||||
};
|
||||
}
|
||||
|
@ -223,11 +223,6 @@ namespace osu.Game.Screens.Play
|
||||
ShowHud.Value = false;
|
||||
break;
|
||||
|
||||
case HUDVisibilityMode.HideDuringBreaks:
|
||||
// always show during replay as we want the seek bar to be visible.
|
||||
ShowHud.Value = replayLoaded.Value || !IsBreakTime.Value;
|
||||
break;
|
||||
|
||||
case HUDVisibilityMode.HideDuringGameplay:
|
||||
// always show during replay as we want the seek bar to be visible.
|
||||
ShowHud.Value = replayLoaded.Value || IsBreakTime.Value;
|
||||
@ -277,9 +272,21 @@ namespace osu.Game.Screens.Play
|
||||
switch (e.Key)
|
||||
{
|
||||
case Key.Tab:
|
||||
configVisibilityMode.Value = configVisibilityMode.Value != HUDVisibilityMode.Never
|
||||
? HUDVisibilityMode.Never
|
||||
: HUDVisibilityMode.HideDuringGameplay;
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user