mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 17:07:38 +08:00
Bind to button's activation delay directly
This commit is contained in:
parent
f39fcee41b
commit
f5026bbbeb
@ -35,8 +35,6 @@ namespace osu.Game.Screens.Play.HUD
|
||||
|
||||
private OsuSpriteText text;
|
||||
|
||||
private readonly Bindable<double> activationDelay = new Bindable<double>();
|
||||
|
||||
public HoldForMenuButton()
|
||||
{
|
||||
Direction = FillDirection.Horizontal;
|
||||
@ -68,7 +66,7 @@ namespace osu.Game.Screens.Play.HUD
|
||||
|
||||
protected override void LoadComplete()
|
||||
{
|
||||
activationDelay.BindValueChanged(v =>
|
||||
button.HoldActivationDelay.BindValueChanged(v =>
|
||||
{
|
||||
text.Text = v.NewValue > 0
|
||||
? "hold for menu"
|
||||
|
Loading…
Reference in New Issue
Block a user