1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-15 00:02:54 +08:00

Allow visibility can be toggled only if replay is loaded

This commit is contained in:
EVAST9919 2017-10-03 20:26:53 +03:00
parent feb0b1852f
commit 1c132938df
2 changed files with 5 additions and 1 deletions

View File

@ -14,6 +14,8 @@ namespace osu.Game.Screens.Play.HUD
{
private const int fade_duration = 200;
public bool ReplayLoaded;
public override bool HandleInput => true;
public readonly PlaybackSettings PlaybackSettings;
@ -53,7 +55,7 @@ namespace osu.Game.Screens.Play.HUD
if (state.Keyboard.ControlPressed)
{
if (args.Key == Key.H)
if (args.Key == Key.H && ReplayLoaded)
{
ToggleVisibility();
return true;

View File

@ -97,6 +97,8 @@ namespace osu.Game.Screens.Play
replayLoaded = rulesetContainer.HasReplayLoaded;
ReplaySettingsOverlay.ReplayLoaded = replayLoaded;
// in the case a replay isn't loaded, we want some elements to only appear briefly.
if (!replayLoaded)
{