Popup.xml 2.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="Popup" inherits="Control" category="Core" version="3.1">
  3. <brief_description>
  4. Base container control for popups and dialogs.
  5. </brief_description>
  6. <description>
  7. 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.
  8. </description>
  9. <tutorials>
  10. </tutorials>
  11. <demos>
  12. </demos>
  13. <methods>
  14. <method name="popup">
  15. <return type="void">
  16. </return>
  17. <argument index="0" name="bounds" type="Rect2" default="Rect2( 0, 0, 0, 0 )">
  18. </argument>
  19. <description>
  20. Popup (show the control in modal form).
  21. </description>
  22. </method>
  23. <method name="popup_centered">
  24. <return type="void">
  25. </return>
  26. <argument index="0" name="size" type="Vector2" default="Vector2( 0, 0 )">
  27. </argument>
  28. <description>
  29. Popup (show the control in modal form) in the center of the screen relative to its current canvas transform, at the current size, or at a size determined by "size".
  30. </description>
  31. </method>
  32. <method name="popup_centered_minsize">
  33. <return type="void">
  34. </return>
  35. <argument index="0" name="minsize" type="Vector2" default="Vector2( 0, 0 )">
  36. </argument>
  37. <description>
  38. Popup (show the control in modal form) in the center of the screen relative to the current canvas transform, ensuring the size is never smaller than [code]minsize[/code].
  39. </description>
  40. </method>
  41. <method name="popup_centered_ratio">
  42. <return type="void">
  43. </return>
  44. <argument index="0" name="ratio" type="float" default="0.75">
  45. </argument>
  46. <description>
  47. Popup (show the control in modal form) in the center of the screen relative to the current canvas transform, scaled at a ratio of size of the screen.
  48. </description>
  49. </method>
  50. </methods>
  51. <members>
  52. <member name="popup_exclusive" type="bool" setter="set_exclusive" getter="is_exclusive">
  53. If [code]true[/code], the popup will not be hidden when a click event occurs outside of it, or when it receives the [code]ui_cancel[/code] action event.
  54. </member>
  55. </members>
  56. <signals>
  57. <signal name="about_to_show">
  58. <description>
  59. This signal is emitted when a popup is about to be shown. (often used in [PopupMenu] for clearing the list of options and creating a new one according to the current context).
  60. </description>
  61. </signal>
  62. <signal name="popup_hide">
  63. <description>
  64. This signal is emitted when a popup is hidden.
  65. </description>
  66. </signal>
  67. </signals>
  68. <constants>
  69. <constant name="NOTIFICATION_POST_POPUP" value="80">
  70. Notification sent right after the popup is shown.
  71. </constant>
  72. <constant name="NOTIFICATION_POPUP_HIDE" value="81">
  73. Notification sent right after the popup is hidden.
  74. </constant>
  75. </constants>
  76. </class>