Popup¶
Inherits: Control < CanvasItem < Node < Object
Inherited By: PopupPanel, PopupDialog, PopupMenu, WindowDialog
Category: Core
Brief Description¶
Base container control for popups and dialogs.
Member Functions¶
bool | is_exclusive ( ) const |
void | popup ( ) |
void | popup_centered ( Vector2 size=Vector2(0,0) ) |
void | popup_centered_minsize ( Vector2 minsize=Vector2(0,0) ) |
void | popup_centered_ratio ( float ratio=0.75 ) |
void | set_exclusive ( bool enable ) |
Signals¶
- about_to_show ( )
- popup_hide ( )
Numeric Constants¶
- NOTIFICATION_POST_POPUP = 80 — Notification sent right after the popup is shown.
- NOTIFICATION_POPUP_HIDE = 81 — Notification sent right after the popup is hidden.
Description¶
Popup is a base Control used to show dialogs and popups. It’s a subwindow and modal by default (see Control) and has helpers for custom popup behavior.
Member Function Description¶
- bool is_exclusive ( ) const
Returns whether the popup will hide other popups when shown on the screen.
- void popup ( )
Popup (show the control in modal form).
- void popup_centered ( Vector2 size=Vector2(0,0) )
Popup (show the control in modal form) in the center of the screen, at the current size, or at a size determined by “size”.
- void popup_centered_minsize ( Vector2 minsize=Vector2(0,0) )
Popup (show the control in modal form) in the center of the screen, ensuring the size is never smaller than minsize
.
- void popup_centered_ratio ( float ratio=0.75 )
Popup (show the control in modal form) in the center of the screen, scaled at a ratio of size of the screen.
- void set_exclusive ( bool enable )
Make the popup hide other popups when shown on the screen.