Merge pull request #1018 from Nabile-Rahmani/skip-button-fix

Make the skip button clickable only once.
This commit is contained in:
Dean Herbert 2017-07-14 09:45:16 +09:00 committed by GitHub
commit e3ff79fdd1
1 changed files with 11 additions and 1 deletions

View File

@ -277,9 +277,19 @@ protected override bool OnMouseUp(InputState state, MouseUpEventArgs args)
protected override bool OnClick(InputState state)
{
if (!Enabled)
return false;
box.FlashColour(Color4.White, 500, EasingTypes.OutQuint);
aspect.ScaleTo(1.2f, 2000, EasingTypes.OutQuint);
return base.OnClick(state);
bool result = base.OnClick(state);
// for now, let's disable the skip button after the first press.
// this will likely need to be contextual in the future (bound from external components).
Enabled.Value = false;
return result;
}
}
}