why popup_hide() and about_to_show() signal function didnt work?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Andika Satya Wisnu
:warning: Old Version Published before Godot 3 was released.

i have WindowDialog node and using both about_to_show() 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?

:bust_in_silhouette: Reply From: volzhs

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

Great! this work perfectly. Thanks

Andika Satya Wisnu | 2017-05-19 05:58