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:
parent
feb0b1852f
commit
1c132938df
@ -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;
|
||||
|
@ -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)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user