mirror of
https://github.com/lihop/godot-xterm.git
synced 2025-05-04 20:24:23 +02:00
Godot 4 automatic changes
This commit is contained in:
parent
8b5caafbc7
commit
cdbf3f2adc
75 changed files with 1034 additions and 952 deletions
|
@ -1,10 +1,10 @@
|
|||
extends Control
|
||||
|
||||
onready var terminal = $Terminal
|
||||
@onready var terminal = $Terminal
|
||||
|
||||
|
||||
func _ready():
|
||||
print("terminal size; rows %d; cols %d;" % [terminal.get_rows(), terminal.get_cols()])
|
||||
terminal.write("h")
|
||||
yield(get_tree().create_timer(1), "timeout")
|
||||
await get_tree().create_timer(1).timeout
|
||||
terminal.write(" i")
|
||||
|
|
|
@ -4,16 +4,16 @@
|
|||
[ext_resource path="res://test/scenes/basic.gd" type="Script" id=3]
|
||||
|
||||
[node name="BasicNewTerm" type="Control"]
|
||||
margin_right = 43.0
|
||||
margin_bottom = 43.0
|
||||
offset_right = 43.0
|
||||
offset_bottom = 43.0
|
||||
script = ExtResource( 3 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
}
|
||||
|
||||
[node name="ColorRect" type="ColorRect" parent="."]
|
||||
margin_right = 40.0
|
||||
margin_bottom = 40.0
|
||||
offset_right = 40.0
|
||||
offset_bottom = 40.0
|
||||
color = Color( 0, 1, 0, 1 )
|
||||
__meta__ = {
|
||||
"_edit_use_anchors_": false
|
||||
|
|
|
@ -7,44 +7,44 @@ anchor_right = 1.0
|
|||
anchor_bottom = 1.0
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="."]
|
||||
margin_right = 1024.0
|
||||
margin_bottom = 600.0
|
||||
offset_right = 1024.0
|
||||
offset_bottom = 600.0
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[node name="TextEdit" type="TextEdit" parent="HBoxContainer"]
|
||||
margin_right = 338.0
|
||||
margin_bottom = 600.0
|
||||
offset_right = 338.0
|
||||
offset_bottom = 600.0
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[node name="VBoxContainer" type="VBoxContainer" parent="HBoxContainer"]
|
||||
margin_left = 342.0
|
||||
margin_right = 681.0
|
||||
margin_bottom = 600.0
|
||||
offset_left = 342.0
|
||||
offset_right = 681.0
|
||||
offset_bottom = 600.0
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[node name="TextEdit3" type="TextEdit" parent="HBoxContainer/VBoxContainer"]
|
||||
margin_right = 339.0
|
||||
margin_bottom = 197.0
|
||||
offset_right = 339.0
|
||||
offset_bottom = 197.0
|
||||
size_flags_vertical = 3
|
||||
|
||||
[node name="Terminal" type="Control" parent="HBoxContainer/VBoxContainer"]
|
||||
margin_top = 201.0
|
||||
margin_right = 339.0
|
||||
margin_bottom = 398.0
|
||||
offset_top = 201.0
|
||||
offset_right = 339.0
|
||||
offset_bottom = 398.0
|
||||
focus_mode = 2
|
||||
size_flags_vertical = 3
|
||||
script = ExtResource( 1 )
|
||||
|
||||
[node name="TextEdit2" type="TextEdit" parent="HBoxContainer/VBoxContainer"]
|
||||
margin_top = 402.0
|
||||
margin_right = 339.0
|
||||
margin_bottom = 600.0
|
||||
offset_top = 402.0
|
||||
offset_right = 339.0
|
||||
offset_bottom = 600.0
|
||||
size_flags_vertical = 3
|
||||
|
||||
[node name="TextEdit2" type="TextEdit" parent="HBoxContainer"]
|
||||
margin_left = 685.0
|
||||
margin_right = 1024.0
|
||||
margin_bottom = 600.0
|
||||
offset_left = 685.0
|
||||
offset_right = 1024.0
|
||||
offset_bottom = 600.0
|
||||
size_flags_horizontal = 3
|
||||
|
||||
[connection signal="data_sent" from="HBoxContainer/VBoxContainer/Terminal" to="HBoxContainer/VBoxContainer/Terminal" method="write"]
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
tool
|
||||
@tool
|
||||
extends "res://addons/godot_xterm/terminal.gd"
|
||||
|
||||
signal theme_changed
|
||||
|
@ -27,7 +27,7 @@ func _ready():
|
|||
|
||||
|
||||
func _notification(what):
|
||||
._notification(what)
|
||||
super._notification(what)
|
||||
match what:
|
||||
NOTIFICATION_THEME_CHANGED:
|
||||
call_deferred("emit_signal", "theme_changed")
|
||||
|
|
|
@ -12,7 +12,7 @@ func _ready():
|
|||
|
||||
func _process(_delta):
|
||||
for _i in range(4096):
|
||||
write(PoolByteArray([rng.randi() % 256]))
|
||||
write(PackedByteArray([rng.randi() % 256]))
|
||||
"
|
||||
|
||||
[node name="Terminal" type="Control"]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue