mirror of
https://github.com/ppy/osu.git
synced 2025-01-29 03:43:00 +08:00
Limit max participants field to only numbers.
This commit is contained in:
parent
c5f0b27544
commit
90e178821a
@ -107,7 +107,7 @@ namespace osu.Game.Screens.Multi.Screens.Match.Settings
|
|||||||
{
|
{
|
||||||
new Section("MAX PARTICIPANTS")
|
new Section("MAX PARTICIPANTS")
|
||||||
{
|
{
|
||||||
Child = MaxParticipantsField = new SettingsTextBox
|
Child = MaxParticipantsField = new SettingsNumberTextBox
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
TabbableContentContainer = this,
|
TabbableContentContainer = this,
|
||||||
@ -199,6 +199,11 @@ namespace osu.Game.Screens.Multi.Screens.Match.Settings
|
|||||||
protected override Color4 BackgroundFocused => Color4.Black;
|
protected override Color4 BackgroundFocused => Color4.Black;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private class SettingsNumberTextBox : SettingsTextBox
|
||||||
|
{
|
||||||
|
protected override bool CanAddCharacter(char character) => char.IsNumber(character);
|
||||||
|
}
|
||||||
|
|
||||||
private class SettingsPasswordTextBox : OsuPasswordTextBox
|
private class SettingsPasswordTextBox : OsuPasswordTextBox
|
||||||
{
|
{
|
||||||
protected override Color4 BackgroundUnfocused => Color4.Black;
|
protected override Color4 BackgroundUnfocused => Color4.Black;
|
||||||
|
Loading…
Reference in New Issue
Block a user