Update libtsm to not erase screen on palette change

Fixes #57.
Fixes #58.
This commit is contained in:
Leroy Hopson 2022-08-22 15:54:00 +12:00
parent 07f76f2956
commit d45ea7a3cd
No known key found for this signature in database
GPG key ID: D2747312A6DB51AA
4 changed files with 178 additions and 1 deletions

33
test/scenes/theme.gd Normal file
View file

@ -0,0 +1,33 @@
tool
extends "res://addons/godot_xterm/terminal.gd"
signal theme_changed
func _ready():
# Print every background color.
for i in range(8):
write("\u001b[4%dm " % i) # Regular.
for i in range(8):
write("\u001b[10%dm " % i) # Bright.
write("\u001b[0m") # Reset.
# Print every foreground color.
for i in range(8):
write("\u001b[3%dm█" % i) # Regular.
for i in range(8):
write("\u001b[9%dm█" % i) # Bright.
write("\u001b[0m") # Reset.
# Print every font.
write("L\u001b[0m") # Regular.
write("\u001b[1mL\u001b[0m") # Bold.
write("\u001b[3mL\u001b[0m") # Italic.
write("\u001b[1m\u001b[3mL\u001b[0m") # Bold Italic.
func _notification(what):
._notification(what)
match what:
NOTIFICATION_THEME_CHANGED:
call_deferred("emit_signal", "theme_changed")

8
test/scenes/theme.tscn Normal file
View file

@ -0,0 +1,8 @@
[gd_scene load_steps=2 format=2]
[ext_resource path="res://test/scenes/theme.gd" type="Script" id=1]
[node name="Terminal" type="Control"]
anchor_right = 1.0
anchor_bottom = 1.0
script = ExtResource( 1 )