mirror of
https://github.com/ppy/osu.git
synced 2025-02-20 01:33:12 +08:00
Make the skip button clickable only once.
This commit is contained in:
parent
61c45b0b44
commit
8014cd55a2
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user