Godot Version
4.3
Question
I have a scene like this:
- actionBar
–>HBoxContainer
-----> start_button
-----> pause_button- popup
in my popup.gd i prevent closing by clicking outside of the popup like this:
func _ready():
tabContainer.connect(“tab_changed”, _on_tab_changed)
tabContainer.set_tab_title(0, “Info”)
tabContainer.set_tab_title(1, “Produktion”)
tabContainer.set_tab_title(2, “Staat”)
tabContainer.custom_minimum_size = Vector2(800, 0)connect(“popup_hide”, _prevent_closing)
func _on_close_requested():
disconnect(“popup_hide”, _prevent_closing)
self.hide()connect(“popup_hide”, _prevent_closing)
func _prevent_closing():
self.show()
when i click my actionBar(outside of the popup) i want to trigger their methods(start or pause the game). But its not possible on the first click since the popup seems to block the mouse event for my action bar. Only on the second click i can access it because then my popup is not in the front anymore.
I tried actionBar.move_to_front() or put the z_index=10 but it still wont work. Also i tried to put a CanvasLayer on top of my actionBar and the actionBar inside of it and put the z_index=100 but it still wont work.
Is there any other solution how to achieve the behaviour i want or do i need to remodulate my nodes?