mirror of
https://github.com/osukey/osukey.git
synced 2025-07-01 16:29:58 +09:00
Variant 2: edit changes history, cannot reset index (similar to stable)
This commit is contained in:
@ -101,7 +101,7 @@ namespace osu.Game.Tests.Visual.UserInterface
|
|||||||
|
|
||||||
AddStep("Remove text", () => box.Text = string.Empty);
|
AddStep("Remove text", () => box.Text = string.Empty);
|
||||||
AddStep("Move Up", () => InputManager.Key(Key.Up));
|
AddStep("Move Up", () => InputManager.Key(Key.Up));
|
||||||
AddAssert("Same as previous message", () => box.Text == "Message 2");
|
AddAssert("Text unchanged", () => box.Text == string.Empty);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void addMessages(int count)
|
private void addMessages(int count)
|
||||||
|
@ -33,12 +33,6 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
public HistoryTextBox(int capacity = 100)
|
public HistoryTextBox(int capacity = 100)
|
||||||
{
|
{
|
||||||
messageHistory = new LimitedCapacityQueue<string>(capacity);
|
messageHistory = new LimitedCapacityQueue<string>(capacity);
|
||||||
|
|
||||||
Current.ValueChanged += text =>
|
|
||||||
{
|
|
||||||
if (string.IsNullOrEmpty(text.NewValue))
|
|
||||||
selectedIndex = HistoryCount;
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override bool OnKeyDown(KeyDownEvent e)
|
protected override bool OnKeyDown(KeyDownEvent e)
|
||||||
|
Reference in New Issue
Block a user