mirror of
https://github.com/osukey/osukey.git
synced 2025-08-04 15:16:38 +09:00
Better handle OnClick
This commit is contained in:
@ -108,14 +108,18 @@ namespace osu.Game.Overlays.Profile.Sections
|
|||||||
|
|
||||||
protected override bool OnClick(ClickEvent e)
|
protected override bool OnClick(ClickEvent e)
|
||||||
{
|
{
|
||||||
var clickResult = base.OnClick(e);
|
if (!Enabled.Value)
|
||||||
|
return false;
|
||||||
|
|
||||||
if (IsLoading)
|
try
|
||||||
return clickResult;
|
{
|
||||||
|
return base.OnClick(e);
|
||||||
IsLoading |= clickResult;
|
}
|
||||||
|
finally
|
||||||
return clickResult;
|
{
|
||||||
|
// run afterwards as this will disable this button.
|
||||||
|
IsLoading = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private class ChevronIcon : SpriteIcon
|
private class ChevronIcon : SpriteIcon
|
||||||
|
Reference in New Issue
Block a user