Use .popup() to display a PopupMenu. For a popup, we don’t use .show()
For example, use popup_pause.popup() instead of popup_pause.show()
i tried using that but it wouldn’t work either
ROBOTOO007 | 2020-02-21 15:22
If your menu node is a popup type, then .popup() will display it.
The reason why it doesn’t work in your game might be because of some other kinds of logical errors in your code. For example, maybe Input.is_action_pressed("Esc") doesn’t return true when you press the key “Esc” (maybe the key “Esc” is not an input key for the input action “Esc”). Just check your code again.
Sween123 | 2020-02-21 15:34
I added this to my code:
func _process(delta: float) → void:
if Input.is_action_pressed(“Esc”):
print(Input.is_action_pressed(“Esc”))
var popup_pause = get_node(“esc_menu”)
popup_pause.popup()
and it returns true in the console
but still doesn’t show anything
ROBOTOO007 | 2020-02-21 15:37
Sorry…Because I don’t know your game world, I don’t know what exactly is wrong. Maybe you get the wrong popup menu, or maybe your menu is somewhere else far away from your screen, there can be many small possible problems that get you the wrong results, but the method .popup() itself for a popup node type is the method that will display it.