mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 17:32:54 +08:00
Allow only number characters parseable by int.TryParse
char.IsNumber() is too broad, allowing full width and other numbers.
This commit is contained in:
parent
74db8da11b
commit
0b0ff36154
@ -67,7 +67,7 @@ namespace osu.Game.Overlays.Settings
|
|||||||
|
|
||||||
private class OutlinedNumberBox : OutlinedTextBox
|
private class OutlinedNumberBox : OutlinedTextBox
|
||||||
{
|
{
|
||||||
protected override bool CanAddCharacter(char character) => char.IsNumber(character);
|
protected override bool CanAddCharacter(char character) => character >= '0' && character <= '9';
|
||||||
|
|
||||||
public new void NotifyInputError() => base.NotifyInputError();
|
public new void NotifyInputError() => base.NotifyInputError();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user