Format files using GDScript Toolkit

https://github.com/Scony/godot-gdscript-toolkit
This commit is contained in:
Leroy Hopson 2021-05-26 10:39:48 +07:00
parent a0237bb5d5
commit 84678b2eea
No known key found for this signature in database
GPG key ID: D2747312A6DB51AA
10 changed files with 64 additions and 64 deletions

View file

@ -11,7 +11,6 @@ const CURSOR_LEFT = "\u001b[D"
const DEFAULT_FOREGROUND_COLOR = "\u001b[0m"
var terminal
@ -24,12 +23,13 @@ func write_string(string: String, color: Color = Color.white) -> void:
if color:
var fg = "\u001b[38;2;%d;%d;%dm" % [color.r8, color.g8, color.b8]
terminal.write(fg.to_utf8())
terminal.write(string.to_utf8())
# Reset color back to default.
terminal.write("\u001b[0m".to_utf8())
# tput_* functions based on the tput command.
# See: https://man7.org/linux/man-pages/man1/tput.1.html for more info.