1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 15:27:26 +08:00

Make the skip button clickable only once.

This commit is contained in:
Nabile Rahmani 2017-07-13 21:59:17 +02:00
parent 61c45b0b44
commit 8014cd55a2

View File

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