1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-31 14:25:10 +08:00
osu-lazer/osu.Game/Graphics/UserInterface/OsuNumberBox.cs

20 lines
560 B
C#

// 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.Input;
namespace osu.Game.Graphics.UserInterface
{
public partial class OsuNumberBox : OsuTextBox
{
public OsuNumberBox()
{
InputProperties = new TextInputProperties(TextInputType.Number, false);
SelectAllOnFocus = true;
}
protected override bool CanAddCharacter(char character) => char.IsAsciiDigit(character);
}
}