From 5a34404f6f2c99ece4781edf57303df5aff02592 Mon Sep 17 00:00:00 2001 From: Salman Alshamrani Date: Mon, 4 Nov 2024 04:45:00 -0500 Subject: [PATCH] Please fix --- .../Visual/UserInterface/TestSceneTextBox.cs | 12 +++--------- ...ventLogging.cs => ICanSuppressKeyEventLogging.cs} | 0 2 files changed, 3 insertions(+), 9 deletions(-) rename osu.Framework/Input/{ISuppressKeyEventLogging.cs => ICanSuppressKeyEventLogging.cs} (100%) diff --git a/osu.Framework.Tests/Visual/UserInterface/TestSceneTextBox.cs b/osu.Framework.Tests/Visual/UserInterface/TestSceneTextBox.cs index 3e82f94c72..005177b63b 100644 --- a/osu.Framework.Tests/Visual/UserInterface/TestSceneTextBox.cs +++ b/osu.Framework.Tests/Visual/UserInterface/TestSceneTextBox.cs @@ -170,12 +170,13 @@ public void VariousTextBoxes() [Test] public void TestNumbersOnly() { - NumberTextBox numbers = null; + BasicTextBox numbers = null; AddStep("add number textbox", () => { - textBoxes.Add(numbers = new NumberTextBox + textBoxes.Add(numbers = new BasicTextBox { + InputProperties = new TextInputProperties(TextInputType.Number, false), PlaceholderText = @"Only numbers", Size = new Vector2(500, 30), TabbableContentContainer = textBoxes @@ -1043,13 +1044,6 @@ public partial class InsertableTextBox : BasicTextBox public new void InsertString(string text) => base.InsertString(text); } - private partial class NumberTextBox : BasicTextBox - { - protected override bool CanAddCharacter(char character) => char.IsAsciiDigit(character); - - protected override bool AllowIme => false; - } - private partial class CustomTextBox : BasicTextBox { protected override Drawable GetDrawableCharacter(char c) => new ScalingText(c, FontSize); diff --git a/osu.Framework/Input/ISuppressKeyEventLogging.cs b/osu.Framework/Input/ICanSuppressKeyEventLogging.cs similarity index 100% rename from osu.Framework/Input/ISuppressKeyEventLogging.cs rename to osu.Framework/Input/ICanSuppressKeyEventLogging.cs