fix drag: set module subtree mouse_filter to IGNORE so events reach DashboardGrid
This commit is contained in:
parent
cf933dec6c
commit
cd6295e26f
1 changed files with 17 additions and 8 deletions
|
|
@ -10,23 +10,32 @@ var _initialized: bool = false
|
|||
|
||||
|
||||
func _ready() -> void:
|
||||
if not _initialized:
|
||||
_initialize()
|
||||
# Don't intercept mouse events — DashboardGrid handles drag-and-drop
|
||||
_set_mouse_ignore(self)
|
||||
if not _initialized:
|
||||
_initialize()
|
||||
|
||||
|
||||
func initialize() -> void:
|
||||
pass
|
||||
pass
|
||||
|
||||
|
||||
func refresh(data: Dictionary) -> void:
|
||||
pass
|
||||
pass
|
||||
|
||||
|
||||
func get_module_title() -> String:
|
||||
return module_title
|
||||
return module_title
|
||||
|
||||
|
||||
func _initialize() -> void:
|
||||
_initialized = true
|
||||
initialize()
|
||||
module_ready.emit()
|
||||
_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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue