1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-19 05:22:54 +08:00

Simplify binding

This commit is contained in:
Bartłomiej Dach 2020-06-26 19:22:30 +02:00
parent 415e1c05ff
commit a63b6a3ddf

View File

@ -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
{