class_popup.rst 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  2. .. DO NOT EDIT THIS FILE, but the doc/base/classes.xml source instead.
  3. .. _class_Popup:
  4. Popup
  5. =====
  6. **Inherits:** :ref:`Control<class_control>` **<** :ref:`CanvasItem<class_canvasitem>` **<** :ref:`Node<class_node>` **<** :ref:`Object<class_object>`
  7. **Inherited By:** :ref:`PopupPanel<class_popuppanel>`, :ref:`PopupDialog<class_popupdialog>`, :ref:`PopupMenu<class_popupmenu>`, :ref:`WindowDialog<class_windowdialog>`
  8. **Category:** Core
  9. Brief Description
  10. -----------------
  11. Base container control for popups and dialogs.
  12. Member Functions
  13. ----------------
  14. +--------------------------+------------------------------------------------------------------------------------------------------------------------------------+
  15. | void | :ref:`popup_centered<class_Popup_popup_centered>` **(** :ref:`Vector2<class_vector2>` size=Vector2(0,0) **)** |
  16. +--------------------------+------------------------------------------------------------------------------------------------------------------------------------+
  17. | void | :ref:`popup_centered_ratio<class_Popup_popup_centered_ratio>` **(** :ref:`float<class_float>` ratio=0.75 **)** |
  18. +--------------------------+------------------------------------------------------------------------------------------------------------------------------------+
  19. | void | :ref:`popup_centered_minsize<class_Popup_popup_centered_minsize>` **(** :ref:`Vector2<class_vector2>` minsize=Vector2(0,0) **)** |
  20. +--------------------------+------------------------------------------------------------------------------------------------------------------------------------+
  21. | void | :ref:`popup<class_Popup_popup>` **(** **)** |
  22. +--------------------------+------------------------------------------------------------------------------------------------------------------------------------+
  23. | void | :ref:`set_exclusive<class_Popup_set_exclusive>` **(** :ref:`bool<class_bool>` enable **)** |
  24. +--------------------------+------------------------------------------------------------------------------------------------------------------------------------+
  25. | :ref:`bool<class_bool>` | :ref:`is_exclusive<class_Popup_is_exclusive>` **(** **)** const |
  26. +--------------------------+------------------------------------------------------------------------------------------------------------------------------------+
  27. Signals
  28. -------
  29. - **popup_hide** **(** **)**
  30. - **about_to_show** **(** **)**
  31. Numeric Constants
  32. -----------------
  33. - **NOTIFICATION_POST_POPUP** = **80** --- Notification sent right after the popup is shown.
  34. - **NOTIFICATION_POPUP_HIDE** = **81** --- Notification sent right after the popup is hidden.
  35. Description
  36. -----------
  37. 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.
  38. Member Function Description
  39. ---------------------------
  40. .. _class_Popup_popup_centered:
  41. - void **popup_centered** **(** :ref:`Vector2<class_vector2>` size=Vector2(0,0) **)**
  42. Popup (show the control in modal form) in the center of the screen, at the current size, or at a size determined by "size".
  43. .. _class_Popup_popup_centered_ratio:
  44. - void **popup_centered_ratio** **(** :ref:`float<class_float>` ratio=0.75 **)**
  45. Popup (show the control in modal form) in the center of the screen, scaled at a ratio of size of the screen.
  46. .. _class_Popup_popup_centered_minsize:
  47. - void **popup_centered_minsize** **(** :ref:`Vector2<class_vector2>` minsize=Vector2(0,0) **)**
  48. Popup (show the control in modal form) in the center of the screen, ensuring the size is never smaller than ``minsize``.
  49. .. _class_Popup_popup:
  50. - void **popup** **(** **)**
  51. Popup (show the control in modal form).
  52. .. _class_Popup_set_exclusive:
  53. - void **set_exclusive** **(** :ref:`bool<class_bool>` enable **)**
  54. Make the popup hide other popups when shown on the screen.
  55. .. _class_Popup_is_exclusive:
  56. - :ref:`bool<class_bool>` **is_exclusive** **(** **)** const
  57. Returns whether the popup will hide other popups when shown on the screen.