1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-17 22:17:25 +08:00

Fix hold to pause button not working when HUD is hidden

This commit is contained in:
Dean Herbert 2022-10-30 21:38:45 +09:00
parent 8399261c77
commit 1035b5fb19

View File

@ -39,9 +39,16 @@ namespace osu.Game.Screens.Play
/// </summary>
public float BottomScoringElementsHeight { get; private set; }
// HUD uses AlwaysVisible on child components so they can be in an updated state for next display.
// Without blocking input, this would also allow them to be interacted with in such a state.
public override bool PropagatePositionalInputSubTree => ShowHud.Value;
protected override bool ShouldBeConsideredForInput(Drawable child)
{
// HUD uses AlwaysVisible on child components so they can be in an updated state for next display.
// Without blocking input, this would also allow them to be interacted with in such a state.
if (ShowHud.Value)
return base.ShouldBeConsideredForInput(child);
// hold to quit button should always be interactive.
return child == bottomRightElements;
}
public readonly KeyCounterDisplay KeyCounter;
public readonly ModDisplay ModDisplay;