summaryrefslogtreecommitdiffstats
path: root/scripts/GUI.gd
diff options
context:
space:
mode:
authorJan Tuomi <jan.tuomi@valuemotive.com>2020-08-01 16:49:06 +0300
committerJan Tuomi <jan.tuomi@valuemotive.com>2020-08-01 16:49:06 +0300
commitfd406c55d05f172589b4cf14377d7cc568e5d2b7 (patch)
treee3756bfecf8f611945fc1d26377e7e112934e44d /scripts/GUI.gd
parent9dfb7f8037be735d5e5f88fb47ae07d98dc39274 (diff)
Allow disabling debug
Diffstat (limited to 'scripts/GUI.gd')
-rw-r--r--scripts/GUI.gd6
1 files changed, 4 insertions, 2 deletions
diff --git a/scripts/GUI.gd b/scripts/GUI.gd
index 1e0a781..90a84bb 100644
--- a/scripts/GUI.gd
+++ b/scripts/GUI.gd
@@ -1,5 +1,7 @@
extends MarginContainer
class_name GUI
+export (bool) var show_debug = true
+onready var debug_label = $VBoxContainer/DebugLabel
# Declare member variables here. Examples:
# var a = 2
@@ -8,11 +10,11 @@ class_name GUI
# Called when the node enters the scene tree for the first time.
func _ready():
- pass # Replace with function body.
+ debug_label.set_visible(show_debug)
# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(_delta):
pass
func set_debug_text(text: String):
- $VBoxContainer/Label.set_text(text)
+ debug_label.set_text(text)