From 35a134cdcf7b8a4771124f6751d18ed6f78d4d97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A1l=C3=B3czi=20Kevin?= Date: Mon, 10 Nov 2025 11:42:00 +0100 Subject: [PATCH] fix: previous console command selection --- src/components/global/GameConsole.tsx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/components/global/GameConsole.tsx b/src/components/global/GameConsole.tsx index 714d7b7..a10cba7 100644 --- a/src/components/global/GameConsole.tsx +++ b/src/components/global/GameConsole.tsx @@ -109,11 +109,11 @@ const GameConsole: React.FC = () => { // Set the text. if (_previous >= 0) { // Save the typed text. - if (previous === -1) { + if (_previous === -1) { setCurrentText(conRef.current.value); } - conRef.current.value = previousCommands[previous]; + conRef.current.value = previousCommands[_previous]; } else { conRef.current.value = currentText; } @@ -147,13 +147,13 @@ const GameConsole: React.FC = () => { else _previous -= 1; // Set the text. - if (previous >= 0) { + if (_previous >= 0) { // Save the typed text. - if (previous === -1) { + if (_previous === -1) { setCurrentText(conRef.current.value); } - conRef.current.value = previousCommands[previous]; + conRef.current.value = previousCommands[_previous]; } else { conRef.current.value = currentText; } @@ -203,7 +203,7 @@ const GameConsole: React.FC = () => { addConsoleText( '**WARNING** `UI.DrawEnable` is not writable from the console, which will also be hidden when the UI is not drawing. You can use *' + key + - '* to toggle the game UI.' + '* to toggle the game UI.', ); // Clear the text. @@ -312,7 +312,7 @@ const GameConsole: React.FC = () => { }} > {suggestions[i].text} {suggestions[i].desc} - + , ); }