1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 11:07:52 +08:00

Use disabled state instead of hiding button

This commit is contained in:
Dean Herbert 2021-01-11 14:38:51 +09:00
parent ba3a7a0501
commit bd627534b7

View File

@ -227,11 +227,11 @@ namespace osu.Game.Tournament.Screens
[BackgroundDependencyLoader]
private void load(TournamentStorage storage)
{
startupTournament = storage.CurrentTournament.Value;
dropdown.Current = storage.CurrentTournament;
dropdown.Items = storage.ListTournaments();
dropdown.Current.BindValueChanged(v => Button.FadeTo(v.NewValue == startupTournament ? 0 : 1));
startupTournament = storage.CurrentTournament.Value;
dropdown.Current.BindValueChanged(v => Button.Enabled.Value = v.NewValue != startupTournament, true);
Action = () => game.GracefullyExit();