mirror of
https://github.com/ppy/osu.git
synced 2025-01-28 18:12:56 +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;
|
private const int fade_duration = 200;
|
||||||
|
|
||||||
|
public bool ReplayLoaded;
|
||||||
|
|
||||||
public override bool HandleInput => true;
|
public override bool HandleInput => true;
|
||||||
|
|
||||||
public readonly PlaybackSettings PlaybackSettings;
|
public readonly PlaybackSettings PlaybackSettings;
|
||||||
@ -53,7 +55,7 @@ namespace osu.Game.Screens.Play.HUD
|
|||||||
|
|
||||||
if (state.Keyboard.ControlPressed)
|
if (state.Keyboard.ControlPressed)
|
||||||
{
|
{
|
||||||
if (args.Key == Key.H)
|
if (args.Key == Key.H && ReplayLoaded)
|
||||||
{
|
{
|
||||||
ToggleVisibility();
|
ToggleVisibility();
|
||||||
return true;
|
return true;
|
||||||
|
@ -97,6 +97,8 @@ namespace osu.Game.Screens.Play
|
|||||||
|
|
||||||
replayLoaded = rulesetContainer.HasReplayLoaded;
|
replayLoaded = rulesetContainer.HasReplayLoaded;
|
||||||
|
|
||||||
|
ReplaySettingsOverlay.ReplayLoaded = replayLoaded;
|
||||||
|
|
||||||
// in the case a replay isn't loaded, we want some elements to only appear briefly.
|
// in the case a replay isn't loaded, we want some elements to only appear briefly.
|
||||||
if (!replayLoaded)
|
if (!replayLoaded)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user