mirror of
https://github.com/ppy/osu
synced 2025-01-21 13:23:13 +00:00
Disable the display of HUD through DisplayHud property.
This commit is contained in:
parent
aff74db80d
commit
83be5455d3
@ -487,6 +487,15 @@ namespace osu.Game.Rulesets.UI
|
||||
|
||||
protected virtual ResumeOverlay CreateResumeOverlay() => null;
|
||||
|
||||
/// <summary>
|
||||
/// Whether to display the HUD with this ruleset.
|
||||
/// Override to false to completely disable the display of the HUD with this ruleset.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// HUD refers here to <see cref="HUDOverlay"/> in player as well as <see cref="BreakOverlay"/>.
|
||||
/// </remarks>
|
||||
public virtual bool DisplayHud => true;
|
||||
|
||||
/// <summary>
|
||||
/// Sets a replay to be used, overriding local input.
|
||||
/// </summary>
|
||||
|
@ -89,7 +89,7 @@ namespace osu.Game.Screens.Play
|
||||
|
||||
protected DrawableRuleset DrawableRuleset { get; private set; }
|
||||
|
||||
public HUDOverlay HUDOverlay { get; private set; }
|
||||
protected HUDOverlay HUDOverlay { get; private set; }
|
||||
|
||||
public bool LoadedBeatmapSuccessfully => DrawableRuleset?.Objects.Any() == true;
|
||||
|
||||
@ -184,6 +184,13 @@ namespace osu.Game.Screens.Play
|
||||
addGameplayComponents(GameplayClockContainer, Beatmap.Value, playableBeatmap);
|
||||
addOverlayComponents(GameplayClockContainer, Beatmap.Value);
|
||||
|
||||
if (!DrawableRuleset.DisplayHud)
|
||||
{
|
||||
HUDOverlay.ShowHud.Value = false;
|
||||
HUDOverlay.ShowHud.Disabled = true;
|
||||
BreakOverlay.Hide();
|
||||
}
|
||||
|
||||
DrawableRuleset.HasReplayLoaded.BindValueChanged(_ => updatePauseOnFocusLostState(), true);
|
||||
|
||||
// bind clock into components that require it
|
||||
|
Loading…
Reference in New Issue
Block a user