From 3759d3a0b97ec729707d0ddd7c459247b0e6be02 Mon Sep 17 00:00:00 2001 From: Leroy Hopson Date: Fri, 2 Jul 2021 23:58:25 +0700 Subject: [PATCH] Don't register TPut util as a global unique class --- CHANGELOG.md | 1 + addons/godot_xterm/util/tput.gd | 1 - examples/menu/menu.gd | 2 ++ examples/web_console/web_console.gd | 4 +++- project.godot | 10 ---------- 5 files changed, 6 insertions(+), 12 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1d383c5..4cd0c94 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Supported Godot version -> 3.3.2. - Set a default theme if no theme property has been set. - Changed default font from Cousine to Hack, which is the same as Godot's script editor, and reduced size from 16 to 14. +- TPut no longer registered as a unique global class (i.e. removed `class_name TPut`). ### Fixed - Don't swap red and blue channels of theme colors. diff --git a/addons/godot_xterm/util/tput.gd b/addons/godot_xterm/util/tput.gd index e1f90d8..0324aa5 100644 --- a/addons/godot_xterm/util/tput.gd +++ b/addons/godot_xterm/util/tput.gd @@ -1,5 +1,4 @@ extends Reference -class_name TPut # Control Sequence Introducer const CSI = "\u001b[" diff --git a/examples/menu/menu.gd b/examples/menu/menu.gd index 3d204d7..258566e 100644 --- a/examples/menu/menu.gd +++ b/examples/menu/menu.gd @@ -8,6 +8,8 @@ extends Control # - https://tldp.org/HOWTO/Bash-Prompt-HOWTO/x361.html # - https://www.youtube.com/watch?v=jTSQlIK_92w +const TPut := preload("res://addons/godot_xterm/util/tput.gd") + # Title generated using command: toilet -f pagga GODOT XTERM const TITLE = """ ░█▀▀░█▀█░█▀▄░█▀█░▀█▀░░░█░█░▀█▀░█▀▀░█▀▄░█▄█\r diff --git a/examples/web_console/web_console.gd b/examples/web_console/web_console.gd index 680fff7..d429647 100644 --- a/examples/web_console/web_console.gd +++ b/examples/web_console/web_console.gd @@ -1,9 +1,11 @@ extends Node +const TPut := preload("res://addons/godot_xterm/util/tput.gd") + signal exited(status) var line := "" -var _tput: TPut +var _tput onready var terminal = $Terminal onready var _has_js: bool = OS.has_feature("JavaScript") diff --git a/project.godot b/project.godot index 23a9125..d8c55ea 100644 --- a/project.godot +++ b/project.godot @@ -8,16 +8,6 @@ config_version=4 -_global_script_classes=[ { -"base": "Reference", -"class": "TPut", -"language": "GDScript", -"path": "res://addons/godot_xterm/util/tput.gd" -} ] -_global_script_class_icons={ -"TPut": "" -} - [application] config/name="Godot Xterm"