mirror of
https://github.com/lihop/godot-xterm.git
synced 2025-05-14 15:25:32 +02:00
Add process_mode property to PTY
Adds process_mode property to PTY which can be set to IDLE or PHYSICS. Determines whether the PTY will be updated in the `_process()` or `_physics_process()` step. Defaults to PHYSICS.
This commit is contained in:
parent
2acb93f8ff
commit
3378e6ff8f
7 changed files with 55 additions and 28 deletions
|
@ -91,6 +91,11 @@ func write(data) -> void:
|
|||
_pipe.write(data)
|
||||
|
||||
|
||||
func run_process(_delta):
|
||||
if _pipe:
|
||||
_pipe.poll()
|
||||
|
||||
|
||||
func resize(cols: int, rows: int) -> void:
|
||||
if cols <= 0 or rows <= 0 or cols == NAN or rows == NAN or cols == INF or rows == INF:
|
||||
push_error("Resizing must be done using positive cols and rows.")
|
||||
|
@ -126,11 +131,6 @@ func _parse_env(env: Dictionary = {}) -> PoolStringArray:
|
|||
return pairs
|
||||
|
||||
|
||||
func _process(_delta):
|
||||
if _pipe:
|
||||
_pipe.poll()
|
||||
|
||||
|
||||
func fork(
|
||||
file: String = OS.get_environment("SHELL"),
|
||||
args: PoolStringArray = PoolStringArray(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue