mirror of
https://github.com/ppy/osu
synced 2024-12-15 11:25:29 +00:00
Merge pull request #24327 from ILW8/tourney-reload-tourneys-list
Add reload tournaments list button to tourney setup screen
This commit is contained in:
commit
0170894d18
@ -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,8 @@ namespace osu.Game.Tournament.Screens.Setup
|
||||
dropdown.Items = storage.ListTournaments();
|
||||
dropdown.Current.BindValueChanged(v => Button.Enabled.Value = v.NewValue != startupTournament, true);
|
||||
|
||||
reloadTournamentsButton.Action = () => dropdown.Items = storage.ListTournaments();
|
||||
|
||||
Action = () =>
|
||||
{
|
||||
game.RestartAppWhenExited();
|
||||
@ -48,7 +51,13 @@ namespace osu.Game.Tournament.Screens.Setup
|
||||
Width = BUTTON_SIZE
|
||||
});
|
||||
|
||||
FlowContainer.Insert(-2, dropdown = new OsuDropdown<string>
|
||||
FlowContainer.Insert(-2, reloadTournamentsButton = new RoundedButton
|
||||
{
|
||||
Text = "Refresh",
|
||||
Width = BUTTON_SIZE
|
||||
});
|
||||
|
||||
FlowContainer.Insert(-3, dropdown = new OsuDropdown<string>
|
||||
{
|
||||
Width = 510
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user