fixed characters going off screen at the bottom
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user