2019-06-21 13:04:34 +00:00
|
|
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
|
|
|
// See the LICENCE file in the repository root for full licence text.
|
|
|
|
|
|
|
|
using osu.Framework.Graphics;
|
|
|
|
|
|
|
|
namespace osu.Game.Overlays.Settings
|
|
|
|
{
|
|
|
|
public class SettingsNumberBox : SettingsItem<string>
|
|
|
|
{
|
2021-06-12 16:37:31 +00:00
|
|
|
protected override Drawable CreateControl() => new NumberBox
|
2019-06-21 13:04:34 +00:00
|
|
|
{
|
|
|
|
Margin = new MarginPadding { Top = 5 },
|
|
|
|
RelativeSizeAxes = Axes.X,
|
|
|
|
};
|
2021-06-12 15:57:40 +00:00
|
|
|
|
2021-06-12 16:37:31 +00:00
|
|
|
public class NumberBox : SettingsTextBox.TextBox
|
2021-06-12 15:57:40 +00:00
|
|
|
{
|
|
|
|
protected override bool CanAddCharacter(char character) => char.IsNumber(character);
|
|
|
|
}
|
2019-06-21 13:04:34 +00:00
|
|
|
}
|
|
|
|
}
|