Basics working, added pseudoterminal

Former-commit-id: 1187c9b7a3
This commit is contained in:
Leroy Hopson 2020-07-11 17:45:21 +07:00
parent f6bd5a11c8
commit 6e938f03bf
41 changed files with 1108 additions and 32 deletions

View file

@ -0,0 +1,24 @@
[gd_scene load_steps=5 format=2]
[ext_resource path="res://addons/godot_xterm_native/terminal.gdns" type="Script" id=1]
[ext_resource path="res://addons/godot_xterm_native/themes/default.theme" type="Theme" id=2]
[ext_resource path="res://addons/godot_xterm_native/pseudoterminal.gdns" type="Script" id=3]
[ext_resource path="res://examples/terminal/container.gd" type="Script" id=4]
[node name="Container" type="Container"]
script = ExtResource( 4 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Terminal" type="Control" parent="."]
margin_right = 40.0
margin_bottom = 40.0
theme = ExtResource( 2 )
script = ExtResource( 1 )
__meta__ = {
"_edit_use_anchors_": false
}
[node name="Pseudoterminal" type="Node" parent="."]
script = ExtResource( 3 )

View file

@ -0,0 +1,18 @@
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.
onready var viewport = get_viewport()
func _ready():
$Pseudoterminal.connect("data_received", $Terminal, "write")
viewport.connect("size_changed", self, "_resize")
_resize()
func _resize():
rect_size = viewport.size
$Terminal.rect_size = rect_size