diff --git a/osu.Game/Screens/Multi/Screens/Match/Settings/RoomSettingsOverlay.cs b/osu.Game/Screens/Multi/Screens/Match/Settings/RoomSettingsOverlay.cs index b7cbba505b..2c68ba175c 100644 --- a/osu.Game/Screens/Multi/Screens/Match/Settings/RoomSettingsOverlay.cs +++ b/osu.Game/Screens/Multi/Screens/Match/Settings/RoomSettingsOverlay.cs @@ -107,7 +107,7 @@ namespace osu.Game.Screens.Multi.Screens.Match.Settings { new Section("MAX PARTICIPANTS") { - Child = MaxParticipantsField = new SettingsTextBox + Child = MaxParticipantsField = new SettingsNumberTextBox { RelativeSizeAxes = Axes.X, TabbableContentContainer = this, @@ -199,6 +199,11 @@ namespace osu.Game.Screens.Multi.Screens.Match.Settings protected override Color4 BackgroundFocused => Color4.Black; } + private class SettingsNumberTextBox : SettingsTextBox + { + protected override bool CanAddCharacter(char character) => char.IsNumber(character); + } + private class SettingsPasswordTextBox : OsuPasswordTextBox { protected override Color4 BackgroundUnfocused => Color4.Black;