diff --git a/addons/godot_xterm/editor_plugins/terminal/editor_terminal.gd b/addons/godot_xterm/editor_plugins/terminal/editor_terminal.gd index fac0d3e..349b227 100644 --- a/addons/godot_xterm/editor_plugins/terminal/editor_terminal.gd +++ b/addons/godot_xterm/editor_plugins/terminal/editor_terminal.gd @@ -1,5 +1,5 @@ tool -extends "../../nodes/terminal/terminal.gd" +extends "../../terminal.gd" signal exited(exit_code, signum) diff --git a/addons/godot_xterm/editor_plugins/terminal/editor_terminal.tscn b/addons/godot_xterm/editor_plugins/terminal/editor_terminal.tscn index 99bdf2f..b63d438 100644 --- a/addons/godot_xterm/editor_plugins/terminal/editor_terminal.tscn +++ b/addons/godot_xterm/editor_plugins/terminal/editor_terminal.tscn @@ -1,9 +1,10 @@ [gd_scene load_steps=4 format=2] [ext_resource path="res://addons/godot_xterm/editor_plugins/terminal/editor_terminal.gd" type="Script" id=1] -[ext_resource path="res://addons/godot_xterm/nodes/pty/unix/pty_unix.gd" type="Script" id=2] +[ext_resource path="res://addons/godot_xterm/pty.gd" type="Script" id=2] [ext_resource path="res://addons/godot_xterm/themes/default.tres" type="Theme" id=3] + [node name="Terminal" type="Control"] anchor_right = 1.0 anchor_bottom = 1.0 diff --git a/addons/godot_xterm/editor_plugins/terminal/terminal_panel.gd b/addons/godot_xterm/editor_plugins/terminal/terminal_panel.gd index ea6db56..2d435eb 100644 --- a/addons/godot_xterm/editor_plugins/terminal/terminal_panel.gd +++ b/addons/godot_xterm/editor_plugins/terminal/terminal_panel.gd @@ -8,7 +8,7 @@ tool extends Control const EditorTerminal := preload("./editor_terminal.tscn") -const PTY := preload("../../nodes/pty/pty.gd") +const PTY := preload("../../pty.gd") const TerminalSettings := preload("./settings/terminal_settings.gd") const SETTINGS_FILE_PATH := "res://.gdxterm/settings.tres" diff --git a/addons/godot_xterm/editor_plugins/terminal/terminal_panel.tscn b/addons/godot_xterm/editor_plugins/terminal/terminal_panel.tscn index 90bdb6d..c64d72f 100644 --- a/addons/godot_xterm/editor_plugins/terminal/terminal_panel.tscn +++ b/addons/godot_xterm/editor_plugins/terminal/terminal_panel.tscn @@ -2,7 +2,7 @@ [ext_resource path="res://addons/godot_xterm/editor_plugins/terminal/terminal_panel.gd" type="Script" id=1] -[sub_resource type="Image" id=6] +[sub_resource type="Image" id=1] data = { "data": PoolByteArray( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ), "format": "LumAlpha8", @@ -14,7 +14,7 @@ data = { [sub_resource type="ImageTexture" id=2] flags = 4 flags = 4 -image = SubResource( 6 ) +image = SubResource( 1 ) size = Vector2( 16, 16 ) [sub_resource type="StyleBoxTexture" id=3] @@ -25,7 +25,7 @@ margin_right = 2.0 margin_top = 2.0 margin_bottom = 2.0 -[sub_resource type="Image" id=7] +[sub_resource type="Image" id=4] data = { "data": PoolByteArray( 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 224, 224, 224, 0, 224, 224, 224, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 224, 224, 224, 0, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 224, 224, 224, 0, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 224, 224, 224, 0, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 224, 224, 224, 0, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 224, 224, 224, 0, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 224, 224, 224, 0, 224, 224, 224, 0, 224, 224, 224, 0, 224, 224, 224, 0, 224, 224, 224, 0, 224, 224, 224, 0, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 0, 224, 224, 224, 0, 224, 224, 224, 0, 224, 224, 224, 0, 224, 224, 224, 0, 224, 224, 224, 0, 0, 0, 0, 0, 224, 224, 224, 0, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 0, 224, 224, 224, 0, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 0, 0, 0, 0, 0, 224, 224, 224, 0, 224, 224, 224, 0, 224, 224, 224, 0, 224, 224, 224, 0, 224, 224, 224, 0, 224, 224, 224, 0, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 0, 224, 224, 224, 0, 224, 224, 224, 0, 224, 224, 224, 0, 224, 224, 224, 0, 224, 224, 224, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 224, 224, 224, 0, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 224, 224, 224, 0, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 224, 224, 224, 0, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 224, 224, 224, 0, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 224, 224, 224, 0, 224, 224, 224, 255, 224, 224, 224, 255, 224, 224, 224, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 224, 224, 224, 0, 224, 224, 224, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 ), "format": "RGBA8", @@ -37,7 +37,7 @@ data = { [sub_resource type="ImageTexture" id=5] flags = 0 flags = 0 -image = SubResource( 7 ) +image = SubResource( 4 ) size = Vector2( 16, 16 ) [node name="Panel" type="Panel"] @@ -144,7 +144,6 @@ __meta__ = { } [node name="SizeLabelTimer" type="Timer" parent="SizeLabel"] - [connection signal="resized" from="." to="." method="_on_Panel_resized"] [connection signal="reposition_active_tab_request" from="VBoxContainer/TabbarContainer/Tabs" to="." method="_on_Tabs_reposition_active_tab_request"] [connection signal="tab_changed" from="VBoxContainer/TabbarContainer/Tabs" to="." method="_on_Tabs_tab_changed"] diff --git a/addons/godot_xterm/namespace.gd b/addons/godot_xterm/namespace.gd deleted file mode 100644 index 8e0375c..0000000 --- a/addons/godot_xterm/namespace.gd +++ /dev/null @@ -1,5 +0,0 @@ -class_name GDXterm - -const Terminal := preload("./nodes/terminal/terminal.gd") -const PTYUnix := preload("./nodes/pty/unix/pty_unix.gd") -const TPut := preload("./util/tput.gd") diff --git a/addons/godot_xterm/nodes/pty/pty.gd b/addons/godot_xterm/nodes/pty/pty.gd index 0bc8941..5a63b5b 100644 --- a/addons/godot_xterm/nodes/pty/pty.gd +++ b/addons/godot_xterm/nodes/pty/pty.gd @@ -9,7 +9,7 @@ extends Node const LibuvUtils := preload("./libuv_utils.gd") const Pipe := preload("./pipe.gdns") -const Terminal := preload("../terminal/terminal.gd") +const Terminal := preload("../../terminal.gd") const DEFAULT_NAME := "xterm-256color" const DEFAULT_COLS := 80 diff --git a/addons/godot_xterm/plugin.gd b/addons/godot_xterm/plugin.gd index 4ddc1f0..608e0e7 100644 --- a/addons/godot_xterm/plugin.gd +++ b/addons/godot_xterm/plugin.gd @@ -17,7 +17,7 @@ func _enter_tree(): var asciicast_script = preload("./resources/asciicast.gd") add_custom_type("Asciicast", "Animation", asciicast_script, null) - var terminal_script = preload("./nodes/terminal/terminal.gd") + var terminal_script = preload("./terminal.gd") var terminal_icon = preload("./nodes/terminal/terminal_icon.svg") add_custom_type("Terminal", "Control", terminal_script, terminal_icon) @@ -27,7 +27,7 @@ func _enter_tree(): var pty_script match OS.get_name(): "X11", "Server", "OSX": - pty_script = load("%s/nodes/pty/unix/pty_unix.gd" % base_dir) + pty_script = load("%s/nodes/pty/pty.gd" % base_dir) add_custom_type("PTY", "Node", pty_script, pty_icon) var terminal_settings_script = preload("./editor_plugins/terminal/settings/terminal_settings.gd") add_custom_type("TerminalSettings", "Resource", terminal_settings_script, null) diff --git a/addons/godot_xterm/nodes/pty/unix/pty_unix.gd b/addons/godot_xterm/pty.gd similarity index 94% rename from addons/godot_xterm/nodes/pty/unix/pty_unix.gd rename to addons/godot_xterm/pty.gd index b2300cd..a895dbf 100644 --- a/addons/godot_xterm/nodes/pty/unix/pty_unix.gd +++ b/addons/godot_xterm/pty.gd @@ -5,9 +5,9 @@ # Copyright (c) 2021, Leroy Hopson (MIT License). tool -extends "../pty.gd" +extends "./nodes/pty/pty.gd" -const PTYUnix = preload("./pty_unix.gdns") +const PTYUnix = preload("./nodes/pty/unix/pty_unix.gdns") const FALLBACK_FILE = "sh" @@ -36,7 +36,7 @@ func _resize(cols: int, rows: int) -> void: func _fork_thread(args): - var result = preload("./pty_unix.gdns").new().callv("fork", args) + var result = preload("./nodes/pty/unix/pty_unix.gdns").new().callv("fork", args) return result diff --git a/addons/godot_xterm/nodes/terminal/terminal.gd b/addons/godot_xterm/terminal.gd similarity index 98% rename from addons/godot_xterm/nodes/terminal/terminal.gd rename to addons/godot_xterm/terminal.gd index 80aa56b..2652c37 100644 --- a/addons/godot_xterm/nodes/terminal/terminal.gd +++ b/addons/godot_xterm/terminal.gd @@ -44,8 +44,8 @@ export var bell_cooldown: float = 0.1 export var blink_on_time: float = 0.6 export var blink_off_time: float = 0.3 -var _default_theme: Theme = preload("../../themes/default.tres") -var _viewport: Viewport = preload("./viewport.tscn").instance() +var _default_theme: Theme = preload("./themes/default.tres") +var _viewport: Viewport = preload("./nodes/terminal/viewport.tscn").instance() var _native_terminal: Control = _viewport.get_node("Terminal") var _screen := TextureRect.new() diff --git a/examples/asciicast/asciicast.tscn b/examples/asciicast/asciicast.tscn index f89d133..8d22976 100644 --- a/examples/asciicast/asciicast.tscn +++ b/examples/asciicast/asciicast.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=3 format=2] -[ext_resource path="res://addons/godot_xterm/nodes/terminal/terminal.gd" type="Script" id=1] +[ext_resource path="res://addons/godot_xterm/terminal.gd" type="Script" id=1] [ext_resource path="res://examples/asciicast/example.cast" type="Animation" id=6] [node name="Terminal" type="Control"] diff --git a/examples/menu/menu.gd b/examples/menu/menu.gd index ee877ec..4c5f96c 100644 --- a/examples/menu/menu.gd +++ b/examples/menu/menu.gd @@ -8,6 +8,8 @@ extends Control # - https://tldp.org/HOWTO/Bash-Prompt-HOWTO/x361.html # - https://www.youtube.com/watch?v=jTSQlIK_92w +const TPut = preload("res://addons/godot_xterm/util/tput.gd") + # Title generated using command: toilet -f pagga GODOT XTERM const TITLE = """ ░█▀▀░█▀█░█▀▄░█▀█░▀█▀░░░█░█░▀█▀░█▀▀░█▀▄░█▄█\r @@ -36,10 +38,12 @@ var row: int var menu_start_row: int var offset: int -onready var tput = GDXterm.TPut.new($Terminal) +onready var tput = TPut.new($Terminal) func _ready(): + if not $Terminal.is_connected("key_pressed", self, "_on_Terminal_key_pressed"): + $Terminal.connect("key_pressed", self, "_on_Terminal_key_pressed") # warning-ignore:return_value_discarded $Terminal.connect("size_changed", self, "draw_all") $Terminal.grab_focus() diff --git a/examples/menu/menu.tscn b/examples/menu/menu.tscn index 0e08f23..0d26426 100644 --- a/examples/menu/menu.tscn +++ b/examples/menu/menu.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=3 format=2] -[ext_resource path="res://addons/godot_xterm/nodes/terminal/terminal.gd" type="Script" id=1] +[ext_resource path="res://addons/godot_xterm/terminal.gd" type="Script" id=1] [ext_resource path="res://examples/menu/menu.gd" type="Script" id=2] [node name="Menu" type="Control"] @@ -19,4 +19,9 @@ script = ExtResource( 1 ) __meta__ = { "_edit_use_anchors_": false } -[connection signal="key_pressed" from="Terminal" to="." method="_on_Terminal_key_pressed"] +update_mode = 1 +copy_on_selection = false +bell_muted = false +bell_cooldown = 0.1 +blink_on_time = 0.6 +blink_off_time = 0.3 diff --git a/examples/socat_terminal/socat_terminal.gd b/examples/socat_terminal/socat_terminal.gd index ac0fc19..0795cae 100644 --- a/examples/socat_terminal/socat_terminal.gd +++ b/examples/socat_terminal/socat_terminal.gd @@ -1,4 +1,4 @@ -extends "res://addons/godot_xterm/nodes/terminal/terminal.gd" +extends "res://addons/godot_xterm/terminal.gd" export (String) var exec_path := "bash" export (String) var socat_path := "socat" # E.g. /usr/bin/socat diff --git a/examples/socat_terminal/socat_terminal.tscn b/examples/socat_terminal/socat_terminal.tscn index 2db3443..92918fb 100644 --- a/examples/socat_terminal/socat_terminal.tscn +++ b/examples/socat_terminal/socat_terminal.tscn @@ -10,5 +10,4 @@ script = ExtResource( 1 ) __meta__ = { "_edit_use_anchors_": false } - [connection signal="data_sent" from="." to="." method="_on_Terminal_data_sent"] diff --git a/examples/terminal/terminal.gd b/examples/terminal/terminal.gd index 901567a..6887f56 100644 --- a/examples/terminal/terminal.gd +++ b/examples/terminal/terminal.gd @@ -1,4 +1,4 @@ -extends "res://addons/godot_xterm/nodes/terminal/terminal.gd" +extends "res://addons/godot_xterm/terminal.gd" onready var pty = $PTY diff --git a/examples/terminal/terminal.tscn b/examples/terminal/terminal.tscn index 06fd1e9..b80b827 100644 --- a/examples/terminal/terminal.tscn +++ b/examples/terminal/terminal.tscn @@ -1,9 +1,10 @@ [gd_scene load_steps=4 format=2] [ext_resource path="res://themes/audio/bell.wav" type="AudioStream" id=1] -[ext_resource path="res://addons/godot_xterm/nodes/pty/unix/pty_unix.gd" type="Script" id=2] +[ext_resource path="res://addons/godot_xterm/pty.gd" type="Script" id=2] [ext_resource path="res://examples/terminal/terminal.gd" type="Script" id=3] + [node name="Terminal" type="Control"] anchor_right = 1.0 anchor_bottom = 1.0 diff --git a/examples/web_console/web_console.tscn b/examples/web_console/web_console.tscn index 6c3a6fe..ed04a4f 100644 --- a/examples/web_console/web_console.tscn +++ b/examples/web_console/web_console.tscn @@ -1,8 +1,9 @@ [gd_scene load_steps=3 format=2] -[ext_resource path="res://addons/godot_xterm/nodes/terminal/terminal.gd" type="Script" id=2] +[ext_resource path="res://addons/godot_xterm/terminal.gd" type="Script" id=2] [ext_resource path="res://examples/web_console/web_console.gd" type="Script" id=3] + [node name="WebConsole" type="Control"] anchor_right = 1.0 anchor_bottom = 1.0 diff --git a/project.godot b/project.godot index a9ba2c3..b63c0c4 100644 --- a/project.godot +++ b/project.godot @@ -8,14 +8,9 @@ config_version=4 -_global_script_classes=[ { -"base": "Reference", -"class": "GDXterm", -"language": "GDScript", -"path": "res://addons/godot_xterm/namespace.gd" -} ] +_global_script_classes=[ ] _global_script_class_icons={ -"GDXterm": "" + } [application] diff --git a/test/platform/unix/unix.test.gd b/test/platform/unix/unix.test.gd index 9939dea..b67cc91 100644 --- a/test/platform/unix/unix.test.gd +++ b/test/platform/unix/unix.test.gd @@ -1,8 +1,9 @@ extends "res://addons/gut/test.gd" const LibuvUtils := preload("res://addons/godot_xterm/nodes/pty/libuv_utils.gd") +var PTY = load("res://addons/godot_xterm/pty.gd") -var pty: GDXterm.PTYUnix +var pty var helper: Helper @@ -14,7 +15,7 @@ func before_all(): func before_each(): - pty = GDXterm.PTYUnix.new() + pty = PTY.new() add_child_autofree(pty) diff --git a/test/scenes/basic.tscn b/test/scenes/basic.tscn index 54e488d..baf7bf2 100644 --- a/test/scenes/basic.tscn +++ b/test/scenes/basic.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=3 format=2] -[ext_resource path="res://addons/godot_xterm/nodes/terminal/terminal.gd" type="Script" id=2] +[ext_resource path="res://addons/godot_xterm/terminal.gd" type="Script" id=2] [ext_resource path="res://test/scenes/basic.gd" type="Script" id=3] [node name="BasicNewTerm" type="Control"] diff --git a/test/scenes/basic_fullscreen.tscn b/test/scenes/basic_fullscreen.tscn index a625c73..26bb092 100644 --- a/test/scenes/basic_fullscreen.tscn +++ b/test/scenes/basic_fullscreen.tscn @@ -1,6 +1,6 @@ [gd_scene load_steps=3 format=2] -[ext_resource path="res://addons/godot_xterm/nodes/terminal/terminal.gd" type="Script" id=1] +[ext_resource path="res://addons/godot_xterm/terminal.gd" type="Script" id=1] [ext_resource path="res://test/scenes/basic.gd" type="Script" id=2] [node name="BasicNewTerm" type="Control"] diff --git a/test/unit/terminal.test.gd b/test/unit/terminal.test.gd index 7209103..1496507 100644 --- a/test/unit/terminal.test.gd +++ b/test/unit/terminal.test.gd @@ -1,10 +1,12 @@ extends "res://addons/gut/test.gd" -var term: GDXterm.Terminal +const Terminal := preload("res://addons/godot_xterm/terminal.gd") + +var term: Terminal func before_each(): - term = GDXterm.Terminal.new() + term = Terminal.new() term.rect_size = Vector2(400, 200) add_child_autofree(term)