diff --git a/addons/godot_xterm/plugin.gd b/addons/godot_xterm/plugin.gd index 62e4338..9a0732e 100644 --- a/addons/godot_xterm/plugin.gd +++ b/addons/godot_xterm/plugin.gd @@ -11,7 +11,7 @@ func _enter_tree(): var asciicast_script = preload("res://addons/godot_xterm/resources/asciicast.gd") add_custom_type("Asciicast", "Animation", asciicast_script, null) - var terminal_script = preload("res://addons/godot_xterm/nodes/terminal/terminal.gdns") + var terminal_script = preload("res://addons/godot_xterm/nodes/terminal/terminal.gd") var terminal_icon = preload("res://addons/godot_xterm/nodes/terminal/terminal_icon.svg") add_custom_type("Terminal", "Control", terminal_script, terminal_icon) diff --git a/examples/asciicast/asciicast.gd b/examples/asciicast/asciicast.gd deleted file mode 100644 index b3166a8..0000000 --- a/examples/asciicast/asciicast.gd +++ /dev/null @@ -1,54 +0,0 @@ -extends Container -# This Container ensures that the terminal always fills -# the window and/or screen. It also connects the terminal -# to the input/output of the Psuedoterminal. - -const ESCAPE = 27 -const BACKSPACE = 8 -const BEEP = 7 -const SPACE = 32 -const LEFT_BRACKET = 91 -const ENTER = 10 -const BACKSPACE_ALT = 127 - -onready var viewport = get_viewport() - - -func _ready(): - viewport.connect("size_changed", self, "_resize") - _resize() - $Terminal/AnimationPlayer.play("a") - - -func _input(event): - #return - if event is InputEventKey and event.pressed: - var data = PoolByteArray([]) - accept_event() - - # TODO: Handle more of these. - if event.control and event.scancode == KEY_C: - data.append(3) - elif event.unicode: - data.append(event.unicode) - elif event.scancode == KEY_ENTER: - data.append(ENTER) - elif event.scancode == KEY_BACKSPACE: - data.append(BACKSPACE_ALT) - elif event.scancode == KEY_ESCAPE: - data.append(27) - elif event.scancode == KEY_TAB: - data.append(9) - elif OS.get_scancode_string(event.scancode) == "Shift": - pass - elif OS.get_scancode_string(event.scancode) == "Control": - pass - else: - pass - #push_warning('Unhandled input. scancode: ' + str(OS.get_scancode_string(event.scancode))) - #emit_signal("output", data) - - -func _resize(): - rect_size = viewport.size - $Terminal.rect_size = rect_size diff --git a/examples/menu/menu.gd b/examples/menu/menu.gd index 80058ff..3d204d7 100644 --- a/examples/menu/menu.gd +++ b/examples/menu/menu.gd @@ -156,9 +156,7 @@ func _on_Terminal_key_pressed(data: String, event: InputEventKey) -> void: get_tree().get_root().add_child(scene) visible = false scene.grab_focus() - print("await the exit!") yield(pty, "exited") - print("a got here") visible = true $Terminal.grab_focus() scene.queue_free() diff --git a/examples/terminal/Node.gd b/examples/terminal/Node.gd deleted file mode 100644 index 3a1be69..0000000 --- a/examples/terminal/Node.gd +++ /dev/null @@ -1,6 +0,0 @@ -extends Node - - -func _on_Terminal_key_pressed(event: InputEventKey, data: PoolByteArray): - print(data as Array) - print(event.scancode)