mirror of
https://github.com/ppy/osu.git
synced 2025-01-28 03:22:54 +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 OsuDropdown<string> dropdown;
|
||||||
private OsuButton folderButton;
|
private OsuButton folderButton;
|
||||||
|
private OsuButton reloadTournamentsButton;
|
||||||
|
|
||||||
[Resolved]
|
[Resolved]
|
||||||
private TournamentGameBase game { get; set; }
|
private TournamentGameBase game { get; set; }
|
||||||
@ -28,6 +29,9 @@ namespace osu.Game.Tournament.Screens.Setup
|
|||||||
dropdown.Items = storage.ListTournaments();
|
dropdown.Items = storage.ListTournaments();
|
||||||
dropdown.Current.BindValueChanged(v => Button.Enabled.Value = v.NewValue != startupTournament, true);
|
dropdown.Current.BindValueChanged(v => Button.Enabled.Value = v.NewValue != startupTournament, true);
|
||||||
|
|
||||||
|
reloadTournamentsButton.Enabled.Value = true;
|
||||||
|
reloadTournamentsButton.Action = () => dropdown.Items = storage.ListTournaments();
|
||||||
|
|
||||||
Action = () =>
|
Action = () =>
|
||||||
{
|
{
|
||||||
game.RestartAppWhenExited();
|
game.RestartAppWhenExited();
|
||||||
@ -48,7 +52,13 @@ namespace osu.Game.Tournament.Screens.Setup
|
|||||||
Width = BUTTON_SIZE
|
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
|
Width = 510
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user