fix: html entity syntax error in dashboard.gd, add @tool for editor preview

This commit is contained in:
Eric Smith 2026-05-20 13:08:38 -04:00
parent 499df2846c
commit 9ec671d4c9
2 changed files with 134 additions and 130 deletions

View file

@ -1,3 +1,4 @@
@tool
extends Control extends Control
@ -7,6 +8,9 @@ var _modules: Array = []
func _ready() -> void: func _ready() -> void:
if Engine.is_editor_hint():
_set_background()
return
get_window().mode = Window.MODE_FULLSCREEN get_window().mode = Window.MODE_FULLSCREEN
_set_background() _set_background()
_add_modules() _add_modules()
@ -23,7 +27,6 @@ func _add_modules() -> void:
grid.place_module(cpu, 0, 0) grid.place_module(cpu, 0, 0)
_modules.append(cpu) _modules.append(cpu)
# Start a timer to refresh all modules every second
var timer := Timer.new() var timer := Timer.new()
timer.timeout.connect(_refresh_modules) timer.timeout.connect(_refresh_modules)
timer.autostart = true timer.autostart = true
@ -34,5 +37,5 @@ func _add_modules() -> void:
func _refresh_modules() -> void: func _refresh_modules() -> void:
var data: Dictionary = {} var data: Dictionary = {}
for mod in _modules: for mod in _modules:
if is_instance_valid(mod) and mod.has_method("refresh"): if is_instance_valid(mod) and mod.has_method("refresh"):
mod.refresh(data) mod.refresh(data)

View file

@ -1,3 +1,4 @@
@tool
extends Control extends Control
class_name DashboardGrid class_name DashboardGrid