mirror of
https://github.com/lihop/godot-xterm.git
synced 2025-05-03 20:14:22 +02:00
Update libtsm to not erase screen on palette change
Fixes #57. Fixes #58.
This commit is contained in:
parent
07f76f2956
commit
d45ea7a3cd
4 changed files with 178 additions and 1 deletions
33
test/scenes/theme.gd
Normal file
33
test/scenes/theme.gd
Normal 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
8
test/scenes/theme.tscn
Normal 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 )
|
Loading…
Add table
Add a link
Reference in a new issue