mirror of
https://github.com/ppy/osu.git
synced 2025-02-19 05:22:54 +08:00
Simplify binding
This commit is contained in:
parent
415e1c05ff
commit
a63b6a3ddf
@ -153,8 +153,6 @@ namespace osu.Game.Screens.Play
|
||||
|
||||
// start all elements hidden
|
||||
hideTargets.ForEach(d => d.Hide());
|
||||
|
||||
FailingLayer.ShowHealth.BindTo(ShowHealthbar);
|
||||
}
|
||||
|
||||
public override void Hide() => throw new InvalidOperationException($"{nameof(HUDOverlay)} should not be hidden as it will remove the ability of a user to quit. Use {nameof(ShowHud)} instead.");
|
||||
@ -264,7 +262,10 @@ namespace osu.Game.Screens.Play
|
||||
Margin = new MarginPadding { Top = 20 }
|
||||
};
|
||||
|
||||
protected virtual FailingLayer CreateFailingLayer() => new FailingLayer();
|
||||
protected virtual FailingLayer CreateFailingLayer() => new FailingLayer
|
||||
{
|
||||
ShowHealth = { BindTarget = ShowHealthbar }
|
||||
};
|
||||
|
||||
protected virtual KeyCounterDisplay CreateKeyCounter() => new KeyCounterDisplay
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user