diff --git a/osu.Framework.Tests/Visual/UserInterface/TestSceneTextBox.cs b/osu.Framework.Tests/Visual/UserInterface/TestSceneTextBox.cs index 1242f984f3..3e82f94c72 100644 --- a/osu.Framework.Tests/Visual/UserInterface/TestSceneTextBox.cs +++ b/osu.Framework.Tests/Visual/UserInterface/TestSceneTextBox.cs @@ -122,8 +122,9 @@ public void VariousTextBoxes() TabbableContentContainer = otherTextBoxes }); - otherTextBoxes.Add(new BasicPasswordTextBox + otherTextBoxes.Add(new BasicTextBox { + InputProperties = new TextInputProperties(TextInputType.Password, false), PlaceholderText = @"Password textbox", Text = "Secret ;)", Size = new Vector2(500, 30), diff --git a/osu.Framework.Tests/Visual/UserInterface/TestSceneTextBoxEvents.cs b/osu.Framework.Tests/Visual/UserInterface/TestSceneTextBoxEvents.cs index 643924de69..d3211bfd6a 100644 --- a/osu.Framework.Tests/Visual/UserInterface/TestSceneTextBoxEvents.cs +++ b/osu.Framework.Tests/Visual/UserInterface/TestSceneTextBoxEvents.cs @@ -206,7 +206,7 @@ public void TestMovingOrExpandingSelectionInvokesEvent() AddAssert("text input not deactivated", () => textInput.DeactivationQueue.Count == 0); AddAssert("text input not activated again", () => textInput.ActivationQueue.Count == 0); - AddAssert("text input ensure activated", () => textInput.EnsureActivatedQueue.Dequeue() && textInput.EnsureActivatedQueue.Count == 0); + AddAssert("text input ensure activated", () => textInput.EnsureActivatedQueue.Dequeue() != default && textInput.EnsureActivatedQueue.Count == 0); AddStep("click deselection", () => { @@ -217,7 +217,7 @@ public void TestMovingOrExpandingSelectionInvokesEvent() AddAssert("text input not deactivated", () => textInput.DeactivationQueue.Count == 0); AddAssert("text input not activated again", () => textInput.ActivationQueue.Count == 0); - AddAssert("text input ensure activated", () => textInput.EnsureActivatedQueue.Dequeue() && textInput.EnsureActivatedQueue.Count == 0); + AddAssert("text input ensure activated", () => textInput.EnsureActivatedQueue.Dequeue() != default && textInput.EnsureActivatedQueue.Count == 0); AddStep("click-drag selection", () => { @@ -500,7 +500,7 @@ public void TestChangingFocusDoesNotReactivate(bool allowIme) AddStep("add second textbox", () => textInputContainer.Add(secondTextBox = new EventQueuesTextBox { - ImeAllowed = allowIme, + InputProperties = new TextInputProperties(TextInputType.Text, allowIme), Anchor = Anchor.CentreLeft, Origin = Anchor.CentreLeft, CommitOnFocusLost = true, @@ -517,7 +517,7 @@ public void TestChangingFocusDoesNotReactivate(bool allowIme) AddAssert("text input not deactivated", () => textInput.DeactivationQueue.Count == 0); AddAssert("text input not activated again", () => textInput.ActivationQueue.Count == 0); - AddAssert($"text input ensure activated {(allowIme ? "with" : "without")} IME", () => textInput.EnsureActivatedQueue.Dequeue() == allowIme && textInput.EnsureActivatedQueue.Count == 0); + AddAssert($"text input ensure activated {(allowIme ? "with" : "without")} IME", () => textInput.EnsureActivatedQueue.Dequeue().AllowIme == allowIme && textInput.EnsureActivatedQueue.Count == 0); AddStep("commit text", () => InputManager.Key(Key.Enter)); AddAssert("text input deactivated", () => textInput.DeactivationQueue.Dequeue()); @@ -574,10 +574,6 @@ private void testNormalTextInput() public partial class EventQueuesTextBox : TestSceneTextBox.InsertableTextBox { - public bool ImeAllowed { get; set; } = true; - - protected override bool AllowIme => ImeAllowed; - public readonly Queue InputErrorQueue = new Queue(); public readonly Queue UserConsumedTextQueue = new Queue(); public readonly Queue UserRemovedTextQueue = new Queue();