mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 11:35:35 +08:00
Variant 3: cannot change history, cannot reset index (the "default")
This commit is contained in:
parent
672e1cd45b
commit
58288275a6
@ -72,7 +72,7 @@ namespace osu.Game.Tests.Visual.UserInterface
|
||||
AddStep("Change text", () => box.Text = "New message");
|
||||
AddStep("Move down", () => InputManager.Key(Key.Down));
|
||||
AddStep("Move up", () => InputManager.Key(Key.Up));
|
||||
AddAssert("Changes kept", () => box.Text == "New message");
|
||||
AddAssert("Changes lost", () => box.Text == "Message 2");
|
||||
}
|
||||
|
||||
[Test]
|
||||
|
@ -45,8 +45,6 @@ namespace osu.Game.Graphics.UserInterface
|
||||
|
||||
if (selectedIndex == HistoryCount)
|
||||
originalMessage = Text;
|
||||
else if (!string.IsNullOrEmpty(Text))
|
||||
messageHistory[selectedIndex] = Text;
|
||||
|
||||
Text = messageHistory[--selectedIndex];
|
||||
|
||||
@ -56,9 +54,6 @@ namespace osu.Game.Graphics.UserInterface
|
||||
if (selectedIndex == HistoryCount)
|
||||
return true;
|
||||
|
||||
if (!string.IsNullOrEmpty(Text))
|
||||
messageHistory[selectedIndex] = Text;
|
||||
|
||||
if (selectedIndex == HistoryCount - 1)
|
||||
{
|
||||
selectedIndex = HistoryCount;
|
||||
|
Loading…
Reference in New Issue
Block a user