mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 09:27:29 +08:00
add reload tournaments list button to tourney setup screen
This commit is contained in:
parent
bc46502deb
commit
e0fe5c77d5
@ -15,6 +15,7 @@ namespace osu.Game.Tournament.Screens.Setup
|
||||
{
|
||||
private OsuDropdown<string> dropdown;
|
||||
private OsuButton folderButton;
|
||||
private OsuButton reloadTournamentsButton;
|
||||
|
||||
[Resolved]
|
||||
private TournamentGameBase game { get; set; }
|
||||
@ -28,6 +29,9 @@ namespace osu.Game.Tournament.Screens.Setup
|
||||
dropdown.Items = storage.ListTournaments();
|
||||
dropdown.Current.BindValueChanged(v => Button.Enabled.Value = v.NewValue != startupTournament, true);
|
||||
|
||||
reloadTournamentsButton.Enabled.Value = true;
|
||||
reloadTournamentsButton.Action = () => dropdown.Items = storage.ListTournaments();
|
||||
|
||||
Action = () =>
|
||||
{
|
||||
game.RestartAppWhenExited();
|
||||
@ -48,7 +52,13 @@ namespace osu.Game.Tournament.Screens.Setup
|
||||
Width = BUTTON_SIZE
|
||||
});
|
||||
|
||||
FlowContainer.Insert(-2, dropdown = new OsuDropdown<string>
|
||||
FlowContainer.Insert(-2, reloadTournamentsButton = new RoundedButton
|
||||
{
|
||||
Text = "Reload list",
|
||||
Width = BUTTON_SIZE
|
||||
});
|
||||
|
||||
FlowContainer.Insert(-3, dropdown = new OsuDropdown<string>
|
||||
{
|
||||
Width = 510
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user