mirror of
https://github.com/lihop/godot-xterm.git
synced 2024-11-24 10:20:24 +01:00
Move terminal.gd and pty.gd to godot_xterm directory
Makes for pretty paths when extending scripts: `extends "res://addons/godot_xterm/terminal.gd"` vs. `extends "res://addons/godot_xterm/nodes/terminal/terminal.gd"` Currently "res://addons/godot_xterm/pty.gd" is acutally `pty_unix.gd`. This is okay for now as the PTY node is only supported on Unix platforms. However, we will need to sort it out when adding Windows support as part of #25. Also remove the GDXterm namespace.
This commit is contained in:
parent
e6db81615e
commit
9d15420df3
22 changed files with 46 additions and 43 deletions
|
@ -1,5 +1,5 @@
|
|||
tool
|
||||
extends "../../nodes/terminal/terminal.gd"
|
||||
extends "../../terminal.gd"
|
||||
|
||||
signal exited(exit_code, signum)
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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"
|
||||
|
|
|
@ -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"]
|
||||
|
|
|
@ -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")
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
@ -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()
|
||||
|
|
@ -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"]
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -10,5 +10,4 @@ script = ExtResource( 1 )
|
|||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[connection signal="data_sent" from="." to="." method="_on_Terminal_data_sent"]
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
extends "res://addons/godot_xterm/nodes/terminal/terminal.gd"
|
||||
extends "res://addons/godot_xterm/terminal.gd"
|
||||
|
||||
onready var pty = $PTY
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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]
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
||||
|
|
|
@ -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"]
|
||||
|
|
|
@ -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"]
|
||||
|
|
|
@ -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)
|
||||
|
||||
|
|
Loading…
Reference in a new issue