Can someone teach me how to use the Pop up node and her sub nodes ?

Updater3000Updater3000 Posts: 13Member

Hello dear Godot Engine community hope you're doing fine.
Can someone please teach me how to use the Pop up node and her sub nodes ?
I want a dialogue box to show up when I set a certain variable to true, and frankly I have no idea how to use nodes properly I've been doing testes but can't find how to make it work, I think it's mainly because I don't have a solid education on programming and stuff, but I am persistent and I really want to know how these nodes works.

Please, if it's not much asking, can you teach me how to link these nodes with scripts and how to customize them.G


Tags :


  • xananaxxananax Posts: 2Member
    Answer ✓

    What you need to do:

    1) Add a popup node (or any of it's descendants: windowDialog, ConfirmDialog, etc). The popup dialog is just an empty Control node and thus allows you to design your popup however you want. WindowDialog and co feature some helper things (such as a window title to move the window around, a close button, and so on), whereas the Popup node is bare-bones.
    2) When an event happens in your game that should trigger your popup, do get_node("popup").popup(). This will toggle the popup visibility. For example, to show the popup when a button is clicked, you'd connect the pressed signal of the button to a script, then:

    func _on_button_pressed():

    3) You can tick the "exclusive" box if you don't want your popup to disappear when the user clicks outside.

    I attached an example project with three examples inside here:
    the SuperSimplePopupExample is the simplest way; the two others are mildly more advanced ways of controlling popups

  • Updater3000Updater3000 Posts: 13Member

    Thank you very much dear ser, the examples you added are really helpful, now I see how this works, all I need now is how to customize the visuals of a popup window.

Sign In or Register to comment.