mirror of https://github.com/ppy/osu
Use Enabled instead of a private field.
This commit is contained in:
parent
8014cd55a2
commit
840cc918ea
|
@ -182,7 +182,6 @@ private class Button : OsuClickableContainer
|
|||
private FillFlowContainer flow;
|
||||
private Box background;
|
||||
private AspectContainer aspect;
|
||||
private bool isClicked;
|
||||
|
||||
public Button()
|
||||
{
|
||||
|
@ -278,14 +277,16 @@ protected override bool OnMouseUp(InputState state, MouseUpEventArgs args)
|
|||
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue