1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-21 18:42:56 +08:00

Add a max height for the ladder settings dropdowns

This commit is contained in:
smoogipoo 2019-06-21 15:22:56 +09:00
parent ee30612a76
commit cffc82ce81

View File

@ -8,6 +8,7 @@ using osu.Framework.Bindables;
using osu.Framework.Extensions.IEnumerableExtensions; using osu.Framework.Extensions.IEnumerableExtensions;
using osu.Framework.Graphics; using osu.Framework.Graphics;
using osu.Framework.Input.Events; using osu.Framework.Input.Events;
using osu.Game.Graphics.UserInterface;
using osu.Game.Overlays.Settings; using osu.Game.Overlays.Settings;
using osu.Game.Screens.Play.PlayerSettings; using osu.Game.Screens.Play.PlayerSettings;
using osu.Game.Tournament.Components; 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) 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) 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;
}
}
}
}
} }
} }