This site is currently in read-only mode during migration to a new platform.
You cannot post questions, answers or comments, as they would be lost during the migration otherwise.
0 votes

i have WindowDialog node and using both abouttoshow() and popup_hide() signal for visibility detector. This is my code:

func _process(delta):
    get_node("Disabler").set_size(OS.get_window_size())

func _input(event):
    if Input.is_action_pressed("ui_cancel"):
        if not get_node("pause").is_visible():
            get_node("pause").show()
            _on_pause_about_to_show()

func _ready():
    set_process_input(true)
    set_process(true)

func _on_pause_about_to_show():
    print("show")
    get_node("Disabler").show()

func _on_pause_popup_hide():
    print("hide")
    get_node("Disabler").hide()

pause is my modal name, disabler is something like dummy panel for prefent user to doing any click on game.

The problem is, both popup_hide() and about_to_show() function didnt print or doing other thing when my popup was hide or show. Where is my mistake?

in Engine by (35 points)
edited by

1 Answer

0 votes
Best answer

is get_node("pause") WindowDialog?
then use get_node("pause").popup() instead of show()

by (9,800 points)
selected by

Great! this work perfectly. Thanks

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.