mirror of
https://github.com/ppy/osu.git
synced 2025-02-13 12:02:54 +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()
|
||||
{
|
||||
button.Enabled.Value = replayAvailability != ReplayAvailability.NotAvailable;
|
||||
|
||||
switch (replayAvailability)
|
||||
{
|
||||
case ReplayAvailability.Local:
|
||||
button.TooltipText = @"watch replay";
|
||||
button.Enabled.Value = true;
|
||||
break;
|
||||
|
||||
case ReplayAvailability.Online:
|
||||
button.TooltipText = @"download replay";
|
||||
button.Enabled.Value = true;
|
||||
break;
|
||||
|
||||
default:
|
||||
button.TooltipText = @"replay unavailable";
|
||||
button.Enabled.Value = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user