Merge pull request #24327 from ILW8/tourney-reload-tourneys-list

Add reload tournaments list button to tourney setup screen
This commit is contained in:
Dean Herbert 2023-07-22 21:04:12 +09:00 committed by GitHub
commit 0170894d18
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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
});