12 lines
275 B
GDScript
12 lines
275 B
GDScript
extends Button
|
|
|
|
func _ready():
|
|
text = "Debug: OFF"
|
|
pressed.connect(_on_pressed)
|
|
DebugManager.debug_toggled.connect(_on_debug_toggled)
|
|
|
|
func _on_pressed():
|
|
DebugManager.toggle_debug()
|
|
|
|
func _on_debug_toggled(enabled: bool):
|
|
text = "Debug: " + ("ON" if enabled else "OFF") |