class_windowdialog.rst 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254
  1. :github_url: hide
  2. .. DO NOT EDIT THIS FILE!!!
  3. .. Generated automatically from Godot engine sources.
  4. .. Generator: https://github.com/godotengine/godot/tree/3.6/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/3.6/doc/classes/WindowDialog.xml.
  6. .. _class_WindowDialog:
  7. WindowDialog
  8. ============
  9. **Inherits:** :ref:`Popup<class_Popup>` **<** :ref:`Control<class_Control>` **<** :ref:`CanvasItem<class_CanvasItem>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  10. **Inherited By:** :ref:`AcceptDialog<class_AcceptDialog>`
  11. Base class for window dialogs.
  12. .. rst-class:: classref-introduction-group
  13. Description
  14. -----------
  15. Windowdialog is the base class for all window-based dialogs. It's a by-default toplevel :ref:`Control<class_Control>` that draws a window decoration and allows motion and resizing.
  16. .. rst-class:: classref-reftable-group
  17. Properties
  18. ----------
  19. .. table::
  20. :widths: auto
  21. +-----------------------------+---------------------------------------------------------------+-----------+
  22. | :ref:`bool<class_bool>` | :ref:`resizable<class_WindowDialog_property_resizable>` | ``false`` |
  23. +-----------------------------+---------------------------------------------------------------+-----------+
  24. | :ref:`String<class_String>` | :ref:`window_title<class_WindowDialog_property_window_title>` | ``""`` |
  25. +-----------------------------+---------------------------------------------------------------+-----------+
  26. .. rst-class:: classref-reftable-group
  27. Methods
  28. -------
  29. .. table::
  30. :widths: auto
  31. +-------------------------------------------+---------------------------------------------------------------------------------+
  32. | :ref:`TextureButton<class_TextureButton>` | :ref:`get_close_button<class_WindowDialog_method_get_close_button>` **(** **)** |
  33. +-------------------------------------------+---------------------------------------------------------------------------------+
  34. .. rst-class:: classref-reftable-group
  35. Theme Properties
  36. ----------------
  37. .. table::
  38. :widths: auto
  39. +---------------------------------+-----------------------------------------------------------------------------+-------------------------+
  40. | :ref:`Color<class_Color>` | :ref:`title_color<class_WindowDialog_theme_color_title_color>` | ``Color( 0, 0, 0, 1 )`` |
  41. +---------------------------------+-----------------------------------------------------------------------------+-------------------------+
  42. | :ref:`int<class_int>` | :ref:`close_h_ofs<class_WindowDialog_theme_constant_close_h_ofs>` | ``18`` |
  43. +---------------------------------+-----------------------------------------------------------------------------+-------------------------+
  44. | :ref:`int<class_int>` | :ref:`close_v_ofs<class_WindowDialog_theme_constant_close_v_ofs>` | ``18`` |
  45. +---------------------------------+-----------------------------------------------------------------------------+-------------------------+
  46. | :ref:`int<class_int>` | :ref:`scaleborder_size<class_WindowDialog_theme_constant_scaleborder_size>` | ``4`` |
  47. +---------------------------------+-----------------------------------------------------------------------------+-------------------------+
  48. | :ref:`int<class_int>` | :ref:`title_height<class_WindowDialog_theme_constant_title_height>` | ``20`` |
  49. +---------------------------------+-----------------------------------------------------------------------------+-------------------------+
  50. | :ref:`Font<class_Font>` | :ref:`title_font<class_WindowDialog_theme_font_title_font>` | |
  51. +---------------------------------+-----------------------------------------------------------------------------+-------------------------+
  52. | :ref:`Texture<class_Texture>` | :ref:`close<class_WindowDialog_theme_icon_close>` | |
  53. +---------------------------------+-----------------------------------------------------------------------------+-------------------------+
  54. | :ref:`Texture<class_Texture>` | :ref:`close_highlight<class_WindowDialog_theme_icon_close_highlight>` | |
  55. +---------------------------------+-----------------------------------------------------------------------------+-------------------------+
  56. | :ref:`StyleBox<class_StyleBox>` | :ref:`panel<class_WindowDialog_theme_style_panel>` | |
  57. +---------------------------------+-----------------------------------------------------------------------------+-------------------------+
  58. .. rst-class:: classref-section-separator
  59. ----
  60. .. rst-class:: classref-descriptions-group
  61. Property Descriptions
  62. ---------------------
  63. .. _class_WindowDialog_property_resizable:
  64. .. rst-class:: classref-property
  65. :ref:`bool<class_bool>` **resizable** = ``false``
  66. .. rst-class:: classref-property-setget
  67. - void **set_resizable** **(** :ref:`bool<class_bool>` value **)**
  68. - :ref:`bool<class_bool>` **get_resizable** **(** **)**
  69. If ``true``, the user can resize the window.
  70. .. rst-class:: classref-item-separator
  71. ----
  72. .. _class_WindowDialog_property_window_title:
  73. .. rst-class:: classref-property
  74. :ref:`String<class_String>` **window_title** = ``""``
  75. .. rst-class:: classref-property-setget
  76. - void **set_title** **(** :ref:`String<class_String>` value **)**
  77. - :ref:`String<class_String>` **get_title** **(** **)**
  78. The text displayed in the window's title bar.
  79. .. rst-class:: classref-section-separator
  80. ----
  81. .. rst-class:: classref-descriptions-group
  82. Method Descriptions
  83. -------------------
  84. .. _class_WindowDialog_method_get_close_button:
  85. .. rst-class:: classref-method
  86. :ref:`TextureButton<class_TextureButton>` **get_close_button** **(** **)**
  87. Returns the close :ref:`TextureButton<class_TextureButton>`.
  88. \ **Warning:** This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their :ref:`CanvasItem.visible<class_CanvasItem_property_visible>` property.
  89. .. rst-class:: classref-section-separator
  90. ----
  91. .. rst-class:: classref-descriptions-group
  92. Theme Property Descriptions
  93. ---------------------------
  94. .. _class_WindowDialog_theme_color_title_color:
  95. .. rst-class:: classref-themeproperty
  96. :ref:`Color<class_Color>` **title_color** = ``Color( 0, 0, 0, 1 )``
  97. The color of the title text.
  98. .. rst-class:: classref-item-separator
  99. ----
  100. .. _class_WindowDialog_theme_constant_close_h_ofs:
  101. .. rst-class:: classref-themeproperty
  102. :ref:`int<class_int>` **close_h_ofs** = ``18``
  103. The horizontal offset of the close button.
  104. .. rst-class:: classref-item-separator
  105. ----
  106. .. _class_WindowDialog_theme_constant_close_v_ofs:
  107. .. rst-class:: classref-themeproperty
  108. :ref:`int<class_int>` **close_v_ofs** = ``18``
  109. The vertical offset of the close button.
  110. .. rst-class:: classref-item-separator
  111. ----
  112. .. _class_WindowDialog_theme_constant_scaleborder_size:
  113. .. rst-class:: classref-themeproperty
  114. :ref:`int<class_int>` **scaleborder_size** = ``4``
  115. The thickness of the border that can be dragged when scaling the window (if :ref:`resizable<class_WindowDialog_property_resizable>` is enabled).
  116. .. rst-class:: classref-item-separator
  117. ----
  118. .. _class_WindowDialog_theme_constant_title_height:
  119. .. rst-class:: classref-themeproperty
  120. :ref:`int<class_int>` **title_height** = ``20``
  121. The vertical offset of the title text.
  122. .. rst-class:: classref-item-separator
  123. ----
  124. .. _class_WindowDialog_theme_font_title_font:
  125. .. rst-class:: classref-themeproperty
  126. :ref:`Font<class_Font>` **title_font**
  127. The font used to draw the title.
  128. .. rst-class:: classref-item-separator
  129. ----
  130. .. _class_WindowDialog_theme_icon_close:
  131. .. rst-class:: classref-themeproperty
  132. :ref:`Texture<class_Texture>` **close**
  133. The icon for the close button.
  134. .. rst-class:: classref-item-separator
  135. ----
  136. .. _class_WindowDialog_theme_icon_close_highlight:
  137. .. rst-class:: classref-themeproperty
  138. :ref:`Texture<class_Texture>` **close_highlight**
  139. The icon used for the close button when it's hovered with the mouse cursor.
  140. .. rst-class:: classref-item-separator
  141. ----
  142. .. _class_WindowDialog_theme_style_panel:
  143. .. rst-class:: classref-themeproperty
  144. :ref:`StyleBox<class_StyleBox>` **panel**
  145. The style for both the content background of the **WindowDialog** and the title bar. The title bar is created with a top border and an expand margin using the ``panel`` stylebox.
  146. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  147. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  148. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  149. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`