mirror of
https://github.com/ppy/osu.git
synced 2025-02-16 00:22:58 +08:00
Move enabled setting to each case
This commit is contained in:
parent
4432a93d09
commit
358931842f
@ -99,20 +99,21 @@ namespace osu.Game.Screens.Ranking
|
|||||||
|
|
||||||
private void updateState()
|
private void updateState()
|
||||||
{
|
{
|
||||||
button.Enabled.Value = replayAvailability != ReplayAvailability.NotAvailable;
|
|
||||||
|
|
||||||
switch (replayAvailability)
|
switch (replayAvailability)
|
||||||
{
|
{
|
||||||
case ReplayAvailability.Local:
|
case ReplayAvailability.Local:
|
||||||
button.TooltipText = @"watch replay";
|
button.TooltipText = @"watch replay";
|
||||||
|
button.Enabled.Value = true;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ReplayAvailability.Online:
|
case ReplayAvailability.Online:
|
||||||
button.TooltipText = @"download replay";
|
button.TooltipText = @"download replay";
|
||||||
|
button.Enabled.Value = true;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
button.TooltipText = @"replay unavailable";
|
button.TooltipText = @"replay unavailable";
|
||||||
|
button.Enabled.Value = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user