1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 20:07:29 +08:00

Use Enabled instead of a private field.

This commit is contained in:
Nabile Rahmani 2017-07-13 23:35:19 +02:00
parent 8014cd55a2
commit 840cc918ea

View File

@ -182,7 +182,6 @@ namespace osu.Game.Screens.Play
private FillFlowContainer flow;
private Box background;
private AspectContainer aspect;
private bool isClicked;
public Button()
{
@ -278,14 +277,16 @@ namespace osu.Game.Screens.Play
protected override bool OnClick(InputState state)
{
if (isClicked)
if (!Enabled)
return false;
isClicked = true;
box.FlashColour(Color4.White, 500, EasingTypes.OutQuint);
aspect.ScaleTo(1.2f, 2000, EasingTypes.OutQuint);
return base.OnClick(state);
bool result = base.OnClick(state);
Enabled.Value = false;
return result;
}
}
}