From 99b3c08d4aa49c0599e22e2e7df74389af2ea740 Mon Sep 17 00:00:00 2001 From: Brazly Date: Tue, 13 Jan 2026 05:29:38 +0000 Subject: [PATCH] fixed characters going off screen at the bottom --- Assets/Scripts/UI/terminal/terminal_controls.gd | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/Assets/Scripts/UI/terminal/terminal_controls.gd b/Assets/Scripts/UI/terminal/terminal_controls.gd index 7330c93..67264d6 100644 --- a/Assets/Scripts/UI/terminal/terminal_controls.gd +++ b/Assets/Scripts/UI/terminal/terminal_controls.gd @@ -37,12 +37,16 @@ func reset_blink() -> void: # --- Input Handling --- func InputChar(input) -> void: + var charPos = terminalLine.get_character_bounds(max(0, terminalLine.text.length() - 1)) if input == null: return - command = input - terminalLine.text += command - UpdateCaretPos() - reset_blink() + if charPos.end.x > 1600: + pass + else: + command = input + terminalLine.text += command + UpdateCaretPos() + reset_blink() func InputDelChar() -> void: if terminalLine.text.length() > ("user@work " + directory).length() + 1: terminalLine.text = terminalLine.text.left(-1) @@ -166,3 +170,4 @@ func UpdateCaretPos(): var char_rect = terminalLine.get_character_bounds(max(0, last_char_index)) caret.position.x = char_rect.end.x + 1 caret.position.y = char_rect.position.y + print(char_rect.end.x)