mirror of
https://github.com/ppy/osu.git
synced 2025-02-20 04:23:14 +08:00
Add a max height for the ladder settings dropdowns
This commit is contained in:
parent
ee30612a76
commit
cffc82ce81
@ -8,6 +8,7 @@ using osu.Framework.Bindables;
|
||||
using osu.Framework.Extensions.IEnumerableExtensions;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Input.Events;
|
||||
using osu.Game.Graphics.UserInterface;
|
||||
using osu.Game.Overlays.Settings;
|
||||
using osu.Game.Screens.Play.PlayerSettings;
|
||||
using osu.Game.Tournament.Components;
|
||||
@ -80,7 +81,7 @@ namespace osu.Game.Tournament.Screens.Ladder.Components
|
||||
{
|
||||
}
|
||||
|
||||
private class SettingsRoundDropdown : SettingsDropdown<TournamentRound>
|
||||
private class SettingsRoundDropdown : LadderSettingsDropdown<TournamentRound>
|
||||
{
|
||||
public SettingsRoundDropdown(BindableList<TournamentRound> rounds)
|
||||
{
|
||||
@ -114,7 +115,7 @@ namespace osu.Game.Tournament.Screens.Ladder.Components
|
||||
}
|
||||
}
|
||||
|
||||
private class SettingsTeamDropdown : SettingsDropdown<TournamentTeam>
|
||||
private class SettingsTeamDropdown : LadderSettingsDropdown<TournamentTeam>
|
||||
{
|
||||
public SettingsTeamDropdown(BindableList<TournamentTeam> teams)
|
||||
{
|
||||
@ -145,5 +146,23 @@ namespace osu.Game.Tournament.Screens.Ladder.Components
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
private class LadderSettingsDropdown<T> : SettingsDropdown<T>
|
||||
{
|
||||
protected override OsuDropdown<T> CreateDropdown() => new DropdownControl();
|
||||
|
||||
private new class DropdownControl : SettingsDropdown<T>.DropdownControl
|
||||
{
|
||||
protected override DropdownMenu CreateMenu() => new Menu();
|
||||
|
||||
private new class Menu : OsuDropdownMenu
|
||||
{
|
||||
public Menu()
|
||||
{
|
||||
MaxHeight = 200;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user