mirror of
https://github.com/godotengine/godot-docs.git
synced 2026-01-04 14:11:02 +03:00
104 lines
4.9 KiB
ReStructuredText
104 lines
4.9 KiB
ReStructuredText
.. Generated automatically by doc/tools/makerst.py in Godot's source tree.
|
|
.. DO NOT EDIT THIS FILE, but the Popup.xml source instead.
|
|
.. The source is found in doc/classes or modules/<name>/doc_classes.
|
|
|
|
.. _class_Popup:
|
|
|
|
Popup
|
|
=====
|
|
|
|
**Inherits:** :ref:`Control<class_control>` **<** :ref:`CanvasItem<class_canvasitem>` **<** :ref:`Node<class_node>` **<** :ref:`Object<class_object>`
|
|
|
|
**Inherited By:** :ref:`PopupPanel<class_popuppanel>`, :ref:`PopupDialog<class_popupdialog>`, :ref:`PopupMenu<class_popupmenu>`, :ref:`WindowDialog<class_windowdialog>`
|
|
|
|
**Category:** Core
|
|
|
|
Brief Description
|
|
-----------------
|
|
|
|
Base container control for popups and dialogs.
|
|
|
|
Member Functions
|
|
----------------
|
|
|
|
+--------------------------+---------------------------------------------------------------------------------------------------------------------------------------+
|
|
| :ref:`bool<class_bool>` | :ref:`is_exclusive<class_Popup_is_exclusive>` **(** **)** const |
|
|
+--------------------------+---------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`popup<class_Popup_popup>` **(** :ref:`Rect2<class_rect2>` bounds=Rect2( 0, 0, 0, 0 ) **)** |
|
|
+--------------------------+---------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`popup_centered<class_Popup_popup_centered>` **(** :ref:`Vector2<class_vector2>` size=Vector2( 0, 0 ) **)** |
|
|
+--------------------------+---------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`popup_centered_minsize<class_Popup_popup_centered_minsize>` **(** :ref:`Vector2<class_vector2>` minsize=Vector2( 0, 0 ) **)** |
|
|
+--------------------------+---------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`popup_centered_ratio<class_Popup_popup_centered_ratio>` **(** :ref:`float<class_float>` ratio=0.75 **)** |
|
|
+--------------------------+---------------------------------------------------------------------------------------------------------------------------------------+
|
|
| void | :ref:`set_exclusive<class_Popup_set_exclusive>` **(** :ref:`bool<class_bool>` enable **)** |
|
|
+--------------------------+---------------------------------------------------------------------------------------------------------------------------------------+
|
|
|
|
Signals
|
|
-------
|
|
|
|
- **about_to_show** **(** **)**
|
|
This signal is emitted when a popup is about to be shown. (often used in :ref:`PopupMenu<class_popupmenu>` for clearing the list of options and creating a new one according to the current context).
|
|
|
|
- **popup_hide** **(** **)**
|
|
This signal is emitted when a popup is hidden.
|
|
|
|
|
|
Member Variables
|
|
----------------
|
|
|
|
- :ref:`bool<class_bool>` **popup_exclusive**
|
|
|
|
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 :ref:`Control<class_control>` used to show dialogs and popups. It's a subwindow and modal by default (see :ref:`Control<class_control>`) and has helpers for custom popup behavior.
|
|
|
|
Member Function Description
|
|
---------------------------
|
|
|
|
.. _class_Popup_is_exclusive:
|
|
|
|
- :ref:`bool<class_bool>` **is_exclusive** **(** **)** const
|
|
|
|
Returns whether the popup will hide other popups when shown on the screen.
|
|
|
|
.. _class_Popup_popup:
|
|
|
|
- void **popup** **(** :ref:`Rect2<class_rect2>` bounds=Rect2( 0, 0, 0, 0 ) **)**
|
|
|
|
Popup (show the control in modal form).
|
|
|
|
.. _class_Popup_popup_centered:
|
|
|
|
- void **popup_centered** **(** :ref:`Vector2<class_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".
|
|
|
|
.. _class_Popup_popup_centered_minsize:
|
|
|
|
- void **popup_centered_minsize** **(** :ref:`Vector2<class_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``.
|
|
|
|
.. _class_Popup_popup_centered_ratio:
|
|
|
|
- void **popup_centered_ratio** **(** :ref:`float<class_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.
|
|
|
|
.. _class_Popup_set_exclusive:
|
|
|
|
- void **set_exclusive** **(** :ref:`bool<class_bool>` enable **)**
|
|
|
|
Make the popup hide other popups when shown on the screen.
|
|
|
|
|