godot-xterm/test/scenes/theme.gd

25 lines
600 B
GDScript
Raw Permalink Normal View History

2022-11-09 21:57:46 +01:00
@tool
2023-01-20 23:20:44 +01:00
extends Terminal
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.