diff --git a/Assets/Scripts/UI/terminal/terminal_controls.gd b/Assets/Scripts/UI/terminal/terminal_controls.gd index d76f8ae..b5209ad 100644 --- a/Assets/Scripts/UI/terminal/terminal_controls.gd +++ b/Assets/Scripts/UI/terminal/terminal_controls.gd @@ -46,14 +46,14 @@ func InputChar(input) -> void: command = input terminalLine.text += command UpdateCaretPos() - await get_tree().create_timer(.01).timeout + await get_tree().physics_frame reset_blink() func InputDelChar() -> void: if terminalLine.text.length() > ("user@work " + directory).length() + 1: terminalLine.text = terminalLine.text.left(-1) UpdateCaretPos() - await get_tree().create_timer(.01).timeout + await get_tree().physics_frame reset_blink() func EnterCommand() -> void: @@ -191,23 +191,24 @@ func RetrieveData(inputPath: String): func Help(commandName: String = "default"): match commandName: - "default": CreateHistoryEntry("--- AVAILABLE COMMANDS --- -ls (or list) [folder] : List all files and directories/folders -cd [folder] : Change directory (use '..' to go up a directory/folder) -cat (or view) [file] : Read the contents of a file -clear (or cls) : Clear the terminal screen -help : Show this menu --------------------------") + "default": CreateHistoryEntry("--- AVAILABLE COMMANDS --- \n +ls (or list) [folder] ------------ : List all files and directories/folders +cd [folder] ---------------------- : Change directory (use '..' to go up a directory/folder) +cat (or view) [file] ------------- : Read the contents of a file +clear (or cls) ------------------- : Clear the terminal screen +help ----------------------------- : Show this menu +\n +") func ScrollUp(): - await get_tree().create_timer(.0001).timeout + await get_tree().physics_frame scroll.set_deferred("scroll_vertical", scroll.get_v_scroll_bar().value - 100 ) func ScrollDown(): - await get_tree().create_timer(.0001).timeout + await get_tree().physics_frame scroll.set_deferred("scroll_vertical", scroll.get_v_scroll_bar().value + 100 ) @@ -220,7 +221,7 @@ func GetBottomScroll(): func UpdateCaretPos(): - await get_tree().create_timer(.05).timeout + await get_tree().physics_frame var visible_text = terminalLine.get_parsed_text() ruler.autowrap_mode =TextServer.AUTOWRAP_WORD_SMART diff --git a/project.godot b/project.godot index 8fc97d6..455d1db 100644 --- a/project.godot +++ b/project.godot @@ -13,6 +13,7 @@ config_version=5 config/name="FNaF Game Show Project" run/main_scene="uid://dq5ojxx2ytfwv" config/features=PackedStringArray("4.5", "Forward Plus") +run/max_fps=60 config/icon="res://icon.svg" [autoload]