PopupData ​
Inherits: DatabaseResource < Resource
A popup of the game: a scene (a tutorial, a message, a toast, an achievement) and how it behaves when it is shown. The scene is built by the developer on PopupUI; this resource is made for it when the scene is saved in the editor (as a WorldData is made for a world). Show one with UIManager.popups.show_popup(id, data) or with the Popup event action.
Properties ​
String | scene_path | "" |
bool | close_on_escape | true |
bool | block_gameplay_input | true |
bool | pause_game | false |
float | auto_close_seconds | 0.0 |
bool | show_once | false |
WhenBusy | when_another_is_open | WhenBusy.QUEUE |
Methods ​
PackedScene | get_scene() |
Enumerations ​
enum WhenBusy ​
What to do when this popup is asked for while another popup is on the screen
- QUEUE =
0- Wait: it is shown when the popups before it are closed - REPLACE =
1- The popups that are open are closed and this one is shown - STACK =
2- It is shown on top of the ones that are open (toasts, achievements)
Property descriptions ​
String scene_path = "" ​
Path of the scene (its root is a PopupUI)
bool close_on_escape = true ​
ESC closes the popup (when it is the one on top)
bool block_gameplay_input = true ​
Gameplay does not react to the mouse and the keys while the popup is open (the popup itself does)
bool pause_game = false ​
The game is paused while the popup is open (time stands still)
float auto_close_seconds = 0.0 ​
The popup closes itself after this many seconds (real seconds, also while the game is paused; 0 = it waits to be closed)
bool show_once = false ​
The popup is shown once in a game (tutorials): after that it is never shown again, also not after a load
WhenBusy when_another_is_open = WhenBusy.QUEUE ​
What happens when another popup is open
Method descriptions ​
PackedScene get_scene() ​
The scene of the popup, or null when it does not exist.