2026-05-20 12:54:09 -04:00
|
|
|
extends PanelBase
|
|
|
|
|
class_name ModuleBase
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
signal module_ready
|
|
|
|
|
|
|
|
|
|
@export var module_title: String = "Module"
|
|
|
|
|
|
|
|
|
|
var _initialized: bool = false
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
func _ready() -> void:
|
2026-05-20 14:11:32 -04:00
|
|
|
# Don't intercept mouse events — DashboardGrid handles drag-and-drop
|
|
|
|
|
_set_mouse_ignore(self)
|
|
|
|
|
if not _initialized:
|
|
|
|
|
_initialize()
|
2026-05-20 12:54:09 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
func initialize() -> void:
|
2026-05-20 14:11:32 -04:00
|
|
|
pass
|
2026-05-20 12:54:09 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
func refresh(data: Dictionary) -> void:
|
2026-05-20 14:11:32 -04:00
|
|
|
pass
|
2026-05-20 12:54:09 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
func get_module_title() -> String:
|
2026-05-20 14:11:32 -04:00
|
|
|
return module_title
|
2026-05-20 12:54:09 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
func _initialize() -> void:
|
2026-05-20 14:11:32 -04:00
|
|
|
_initialized = true
|
|
|
|
|
initialize()
|
|
|
|
|
module_ready.emit()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
func _set_mouse_ignore(node: Node) -> void:
|
|
|
|
|
if node is Control:
|
|
|
|
|
node.mouse_filter = Control.MOUSE_FILTER_IGNORE
|
|
|
|
|
for child in node.get_children():
|
|
|
|
|
_set_mouse_ignore(child)
|