class_menubar.rst 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659
  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/master/doc/tools/make_rst.py.
  5. .. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/MenuBar.xml.
  6. .. _class_MenuBar:
  7. MenuBar
  8. =======
  9. **Inherits:** :ref:`Control<class_Control>` **<** :ref:`CanvasItem<class_CanvasItem>` **<** :ref:`Node<class_Node>` **<** :ref:`Object<class_Object>`
  10. A horizontal menu bar that creates a menu for each :ref:`PopupMenu<class_PopupMenu>` child.
  11. .. rst-class:: classref-introduction-group
  12. Description
  13. -----------
  14. A horizontal menu bar that creates a menu for each :ref:`PopupMenu<class_PopupMenu>` child. New items are created by adding :ref:`PopupMenu<class_PopupMenu>`\ s to this node.
  15. .. rst-class:: classref-reftable-group
  16. Properties
  17. ----------
  18. .. table::
  19. :widths: auto
  20. +--------------------------------------------------+----------------------------------------------------------------------+-----------+
  21. | :ref:`bool<class_bool>` | :ref:`flat<class_MenuBar_property_flat>` | ``false`` |
  22. +--------------------------------------------------+----------------------------------------------------------------------+-----------+
  23. | :ref:`String<class_String>` | :ref:`language<class_MenuBar_property_language>` | ``""`` |
  24. +--------------------------------------------------+----------------------------------------------------------------------+-----------+
  25. | :ref:`bool<class_bool>` | :ref:`prefer_global_menu<class_MenuBar_property_prefer_global_menu>` | ``true`` |
  26. +--------------------------------------------------+----------------------------------------------------------------------+-----------+
  27. | :ref:`int<class_int>` | :ref:`start_index<class_MenuBar_property_start_index>` | ``-1`` |
  28. +--------------------------------------------------+----------------------------------------------------------------------+-----------+
  29. | :ref:`bool<class_bool>` | :ref:`switch_on_hover<class_MenuBar_property_switch_on_hover>` | ``true`` |
  30. +--------------------------------------------------+----------------------------------------------------------------------+-----------+
  31. | :ref:`TextDirection<enum_Control_TextDirection>` | :ref:`text_direction<class_MenuBar_property_text_direction>` | ``0`` |
  32. +--------------------------------------------------+----------------------------------------------------------------------+-----------+
  33. .. rst-class:: classref-reftable-group
  34. Methods
  35. -------
  36. .. table::
  37. :widths: auto
  38. +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
  39. | :ref:`int<class_int>` | :ref:`get_menu_count<class_MenuBar_method_get_menu_count>`\ (\ ) |const| |
  40. +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
  41. | :ref:`PopupMenu<class_PopupMenu>` | :ref:`get_menu_popup<class_MenuBar_method_get_menu_popup>`\ (\ menu\: :ref:`int<class_int>`\ ) |const| |
  42. +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
  43. | :ref:`String<class_String>` | :ref:`get_menu_title<class_MenuBar_method_get_menu_title>`\ (\ menu\: :ref:`int<class_int>`\ ) |const| |
  44. +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
  45. | :ref:`String<class_String>` | :ref:`get_menu_tooltip<class_MenuBar_method_get_menu_tooltip>`\ (\ menu\: :ref:`int<class_int>`\ ) |const| |
  46. +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
  47. | :ref:`bool<class_bool>` | :ref:`is_menu_disabled<class_MenuBar_method_is_menu_disabled>`\ (\ menu\: :ref:`int<class_int>`\ ) |const| |
  48. +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
  49. | :ref:`bool<class_bool>` | :ref:`is_menu_hidden<class_MenuBar_method_is_menu_hidden>`\ (\ menu\: :ref:`int<class_int>`\ ) |const| |
  50. +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
  51. | :ref:`bool<class_bool>` | :ref:`is_native_menu<class_MenuBar_method_is_native_menu>`\ (\ ) |const| |
  52. +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
  53. | |void| | :ref:`set_disable_shortcuts<class_MenuBar_method_set_disable_shortcuts>`\ (\ disabled\: :ref:`bool<class_bool>`\ ) |
  54. +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
  55. | |void| | :ref:`set_menu_disabled<class_MenuBar_method_set_menu_disabled>`\ (\ menu\: :ref:`int<class_int>`, disabled\: :ref:`bool<class_bool>`\ ) |
  56. +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
  57. | |void| | :ref:`set_menu_hidden<class_MenuBar_method_set_menu_hidden>`\ (\ menu\: :ref:`int<class_int>`, hidden\: :ref:`bool<class_bool>`\ ) |
  58. +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
  59. | |void| | :ref:`set_menu_title<class_MenuBar_method_set_menu_title>`\ (\ menu\: :ref:`int<class_int>`, title\: :ref:`String<class_String>`\ ) |
  60. +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
  61. | |void| | :ref:`set_menu_tooltip<class_MenuBar_method_set_menu_tooltip>`\ (\ menu\: :ref:`int<class_int>`, tooltip\: :ref:`String<class_String>`\ ) |
  62. +-----------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------+
  63. .. rst-class:: classref-reftable-group
  64. Theme Properties
  65. ----------------
  66. .. table::
  67. :widths: auto
  68. +---------------------------------+-------------------------------------------------------------------------------------+-------------------------------------+
  69. | :ref:`Color<class_Color>` | :ref:`font_color<class_MenuBar_theme_color_font_color>` | ``Color(0.875, 0.875, 0.875, 1)`` |
  70. +---------------------------------+-------------------------------------------------------------------------------------+-------------------------------------+
  71. | :ref:`Color<class_Color>` | :ref:`font_disabled_color<class_MenuBar_theme_color_font_disabled_color>` | ``Color(0.875, 0.875, 0.875, 0.5)`` |
  72. +---------------------------------+-------------------------------------------------------------------------------------+-------------------------------------+
  73. | :ref:`Color<class_Color>` | :ref:`font_focus_color<class_MenuBar_theme_color_font_focus_color>` | ``Color(0.95, 0.95, 0.95, 1)`` |
  74. +---------------------------------+-------------------------------------------------------------------------------------+-------------------------------------+
  75. | :ref:`Color<class_Color>` | :ref:`font_hover_color<class_MenuBar_theme_color_font_hover_color>` | ``Color(0.95, 0.95, 0.95, 1)`` |
  76. +---------------------------------+-------------------------------------------------------------------------------------+-------------------------------------+
  77. | :ref:`Color<class_Color>` | :ref:`font_hover_pressed_color<class_MenuBar_theme_color_font_hover_pressed_color>` | ``Color(1, 1, 1, 1)`` |
  78. +---------------------------------+-------------------------------------------------------------------------------------+-------------------------------------+
  79. | :ref:`Color<class_Color>` | :ref:`font_outline_color<class_MenuBar_theme_color_font_outline_color>` | ``Color(0, 0, 0, 1)`` |
  80. +---------------------------------+-------------------------------------------------------------------------------------+-------------------------------------+
  81. | :ref:`Color<class_Color>` | :ref:`font_pressed_color<class_MenuBar_theme_color_font_pressed_color>` | ``Color(1, 1, 1, 1)`` |
  82. +---------------------------------+-------------------------------------------------------------------------------------+-------------------------------------+
  83. | :ref:`int<class_int>` | :ref:`h_separation<class_MenuBar_theme_constant_h_separation>` | ``4`` |
  84. +---------------------------------+-------------------------------------------------------------------------------------+-------------------------------------+
  85. | :ref:`int<class_int>` | :ref:`outline_size<class_MenuBar_theme_constant_outline_size>` | ``0`` |
  86. +---------------------------------+-------------------------------------------------------------------------------------+-------------------------------------+
  87. | :ref:`Font<class_Font>` | :ref:`font<class_MenuBar_theme_font_font>` | |
  88. +---------------------------------+-------------------------------------------------------------------------------------+-------------------------------------+
  89. | :ref:`int<class_int>` | :ref:`font_size<class_MenuBar_theme_font_size_font_size>` | |
  90. +---------------------------------+-------------------------------------------------------------------------------------+-------------------------------------+
  91. | :ref:`StyleBox<class_StyleBox>` | :ref:`disabled<class_MenuBar_theme_style_disabled>` | |
  92. +---------------------------------+-------------------------------------------------------------------------------------+-------------------------------------+
  93. | :ref:`StyleBox<class_StyleBox>` | :ref:`disabled_mirrored<class_MenuBar_theme_style_disabled_mirrored>` | |
  94. +---------------------------------+-------------------------------------------------------------------------------------+-------------------------------------+
  95. | :ref:`StyleBox<class_StyleBox>` | :ref:`hover<class_MenuBar_theme_style_hover>` | |
  96. +---------------------------------+-------------------------------------------------------------------------------------+-------------------------------------+
  97. | :ref:`StyleBox<class_StyleBox>` | :ref:`hover_mirrored<class_MenuBar_theme_style_hover_mirrored>` | |
  98. +---------------------------------+-------------------------------------------------------------------------------------+-------------------------------------+
  99. | :ref:`StyleBox<class_StyleBox>` | :ref:`hover_pressed<class_MenuBar_theme_style_hover_pressed>` | |
  100. +---------------------------------+-------------------------------------------------------------------------------------+-------------------------------------+
  101. | :ref:`StyleBox<class_StyleBox>` | :ref:`hover_pressed_mirrored<class_MenuBar_theme_style_hover_pressed_mirrored>` | |
  102. +---------------------------------+-------------------------------------------------------------------------------------+-------------------------------------+
  103. | :ref:`StyleBox<class_StyleBox>` | :ref:`normal<class_MenuBar_theme_style_normal>` | |
  104. +---------------------------------+-------------------------------------------------------------------------------------+-------------------------------------+
  105. | :ref:`StyleBox<class_StyleBox>` | :ref:`normal_mirrored<class_MenuBar_theme_style_normal_mirrored>` | |
  106. +---------------------------------+-------------------------------------------------------------------------------------+-------------------------------------+
  107. | :ref:`StyleBox<class_StyleBox>` | :ref:`pressed<class_MenuBar_theme_style_pressed>` | |
  108. +---------------------------------+-------------------------------------------------------------------------------------+-------------------------------------+
  109. | :ref:`StyleBox<class_StyleBox>` | :ref:`pressed_mirrored<class_MenuBar_theme_style_pressed_mirrored>` | |
  110. +---------------------------------+-------------------------------------------------------------------------------------+-------------------------------------+
  111. .. rst-class:: classref-section-separator
  112. ----
  113. .. rst-class:: classref-descriptions-group
  114. Property Descriptions
  115. ---------------------
  116. .. _class_MenuBar_property_flat:
  117. .. rst-class:: classref-property
  118. :ref:`bool<class_bool>` **flat** = ``false`` :ref:`🔗<class_MenuBar_property_flat>`
  119. .. rst-class:: classref-property-setget
  120. - |void| **set_flat**\ (\ value\: :ref:`bool<class_bool>`\ )
  121. - :ref:`bool<class_bool>` **is_flat**\ (\ )
  122. Flat **MenuBar** don't display item decoration.
  123. .. rst-class:: classref-item-separator
  124. ----
  125. .. _class_MenuBar_property_language:
  126. .. rst-class:: classref-property
  127. :ref:`String<class_String>` **language** = ``""`` :ref:`🔗<class_MenuBar_property_language>`
  128. .. rst-class:: classref-property-setget
  129. - |void| **set_language**\ (\ value\: :ref:`String<class_String>`\ )
  130. - :ref:`String<class_String>` **get_language**\ (\ )
  131. Language code used for line-breaking and text shaping algorithms, if left empty current locale is used instead.
  132. .. rst-class:: classref-item-separator
  133. ----
  134. .. _class_MenuBar_property_prefer_global_menu:
  135. .. rst-class:: classref-property
  136. :ref:`bool<class_bool>` **prefer_global_menu** = ``true`` :ref:`🔗<class_MenuBar_property_prefer_global_menu>`
  137. .. rst-class:: classref-property-setget
  138. - |void| **set_prefer_global_menu**\ (\ value\: :ref:`bool<class_bool>`\ )
  139. - :ref:`bool<class_bool>` **is_prefer_global_menu**\ (\ )
  140. If ``true``, **MenuBar** will use system global menu when supported.
  141. \ **Note:** If ``true`` and global menu is supported, this node is not displayed, has zero size, and all its child nodes except :ref:`PopupMenu<class_PopupMenu>`\ s are inaccessible.
  142. \ **Note:** This property overrides the value of the :ref:`PopupMenu.prefer_native_menu<class_PopupMenu_property_prefer_native_menu>` property of the child nodes.
  143. .. rst-class:: classref-item-separator
  144. ----
  145. .. _class_MenuBar_property_start_index:
  146. .. rst-class:: classref-property
  147. :ref:`int<class_int>` **start_index** = ``-1`` :ref:`🔗<class_MenuBar_property_start_index>`
  148. .. rst-class:: classref-property-setget
  149. - |void| **set_start_index**\ (\ value\: :ref:`int<class_int>`\ )
  150. - :ref:`int<class_int>` **get_start_index**\ (\ )
  151. Position order in the global menu to insert **MenuBar** items at. All menu items in the **MenuBar** are always inserted as a continuous range. Menus with lower :ref:`start_index<class_MenuBar_property_start_index>` are inserted first. Menus with :ref:`start_index<class_MenuBar_property_start_index>` equal to ``-1`` are inserted last.
  152. .. rst-class:: classref-item-separator
  153. ----
  154. .. _class_MenuBar_property_switch_on_hover:
  155. .. rst-class:: classref-property
  156. :ref:`bool<class_bool>` **switch_on_hover** = ``true`` :ref:`🔗<class_MenuBar_property_switch_on_hover>`
  157. .. rst-class:: classref-property-setget
  158. - |void| **set_switch_on_hover**\ (\ value\: :ref:`bool<class_bool>`\ )
  159. - :ref:`bool<class_bool>` **is_switch_on_hover**\ (\ )
  160. If ``true``, when the cursor hovers above menu item, it will close the current :ref:`PopupMenu<class_PopupMenu>` and open the other one.
  161. .. rst-class:: classref-item-separator
  162. ----
  163. .. _class_MenuBar_property_text_direction:
  164. .. rst-class:: classref-property
  165. :ref:`TextDirection<enum_Control_TextDirection>` **text_direction** = ``0`` :ref:`🔗<class_MenuBar_property_text_direction>`
  166. .. rst-class:: classref-property-setget
  167. - |void| **set_text_direction**\ (\ value\: :ref:`TextDirection<enum_Control_TextDirection>`\ )
  168. - :ref:`TextDirection<enum_Control_TextDirection>` **get_text_direction**\ (\ )
  169. Base text writing direction.
  170. .. rst-class:: classref-section-separator
  171. ----
  172. .. rst-class:: classref-descriptions-group
  173. Method Descriptions
  174. -------------------
  175. .. _class_MenuBar_method_get_menu_count:
  176. .. rst-class:: classref-method
  177. :ref:`int<class_int>` **get_menu_count**\ (\ ) |const| :ref:`🔗<class_MenuBar_method_get_menu_count>`
  178. Returns number of menu items.
  179. .. rst-class:: classref-item-separator
  180. ----
  181. .. _class_MenuBar_method_get_menu_popup:
  182. .. rst-class:: classref-method
  183. :ref:`PopupMenu<class_PopupMenu>` **get_menu_popup**\ (\ menu\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_MenuBar_method_get_menu_popup>`
  184. Returns :ref:`PopupMenu<class_PopupMenu>` associated with menu item.
  185. .. rst-class:: classref-item-separator
  186. ----
  187. .. _class_MenuBar_method_get_menu_title:
  188. .. rst-class:: classref-method
  189. :ref:`String<class_String>` **get_menu_title**\ (\ menu\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_MenuBar_method_get_menu_title>`
  190. Returns menu item title.
  191. .. rst-class:: classref-item-separator
  192. ----
  193. .. _class_MenuBar_method_get_menu_tooltip:
  194. .. rst-class:: classref-method
  195. :ref:`String<class_String>` **get_menu_tooltip**\ (\ menu\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_MenuBar_method_get_menu_tooltip>`
  196. Returns menu item tooltip.
  197. .. rst-class:: classref-item-separator
  198. ----
  199. .. _class_MenuBar_method_is_menu_disabled:
  200. .. rst-class:: classref-method
  201. :ref:`bool<class_bool>` **is_menu_disabled**\ (\ menu\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_MenuBar_method_is_menu_disabled>`
  202. Returns ``true``, if menu item is disabled.
  203. .. rst-class:: classref-item-separator
  204. ----
  205. .. _class_MenuBar_method_is_menu_hidden:
  206. .. rst-class:: classref-method
  207. :ref:`bool<class_bool>` **is_menu_hidden**\ (\ menu\: :ref:`int<class_int>`\ ) |const| :ref:`🔗<class_MenuBar_method_is_menu_hidden>`
  208. Returns ``true``, if menu item is hidden.
  209. .. rst-class:: classref-item-separator
  210. ----
  211. .. _class_MenuBar_method_is_native_menu:
  212. .. rst-class:: classref-method
  213. :ref:`bool<class_bool>` **is_native_menu**\ (\ ) |const| :ref:`🔗<class_MenuBar_method_is_native_menu>`
  214. Returns ``true``, if system global menu is supported and used by this **MenuBar**.
  215. .. rst-class:: classref-item-separator
  216. ----
  217. .. _class_MenuBar_method_set_disable_shortcuts:
  218. .. rst-class:: classref-method
  219. |void| **set_disable_shortcuts**\ (\ disabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_MenuBar_method_set_disable_shortcuts>`
  220. If ``true``, shortcuts are disabled and cannot be used to trigger the button.
  221. .. rst-class:: classref-item-separator
  222. ----
  223. .. _class_MenuBar_method_set_menu_disabled:
  224. .. rst-class:: classref-method
  225. |void| **set_menu_disabled**\ (\ menu\: :ref:`int<class_int>`, disabled\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_MenuBar_method_set_menu_disabled>`
  226. If ``true``, menu item is disabled.
  227. .. rst-class:: classref-item-separator
  228. ----
  229. .. _class_MenuBar_method_set_menu_hidden:
  230. .. rst-class:: classref-method
  231. |void| **set_menu_hidden**\ (\ menu\: :ref:`int<class_int>`, hidden\: :ref:`bool<class_bool>`\ ) :ref:`🔗<class_MenuBar_method_set_menu_hidden>`
  232. If ``true``, menu item is hidden.
  233. .. rst-class:: classref-item-separator
  234. ----
  235. .. _class_MenuBar_method_set_menu_title:
  236. .. rst-class:: classref-method
  237. |void| **set_menu_title**\ (\ menu\: :ref:`int<class_int>`, title\: :ref:`String<class_String>`\ ) :ref:`🔗<class_MenuBar_method_set_menu_title>`
  238. Sets menu item title.
  239. .. rst-class:: classref-item-separator
  240. ----
  241. .. _class_MenuBar_method_set_menu_tooltip:
  242. .. rst-class:: classref-method
  243. |void| **set_menu_tooltip**\ (\ menu\: :ref:`int<class_int>`, tooltip\: :ref:`String<class_String>`\ ) :ref:`🔗<class_MenuBar_method_set_menu_tooltip>`
  244. Sets menu item tooltip.
  245. .. rst-class:: classref-section-separator
  246. ----
  247. .. rst-class:: classref-descriptions-group
  248. Theme Property Descriptions
  249. ---------------------------
  250. .. _class_MenuBar_theme_color_font_color:
  251. .. rst-class:: classref-themeproperty
  252. :ref:`Color<class_Color>` **font_color** = ``Color(0.875, 0.875, 0.875, 1)`` :ref:`🔗<class_MenuBar_theme_color_font_color>`
  253. Default text :ref:`Color<class_Color>` of the menu item.
  254. .. rst-class:: classref-item-separator
  255. ----
  256. .. _class_MenuBar_theme_color_font_disabled_color:
  257. .. rst-class:: classref-themeproperty
  258. :ref:`Color<class_Color>` **font_disabled_color** = ``Color(0.875, 0.875, 0.875, 0.5)`` :ref:`🔗<class_MenuBar_theme_color_font_disabled_color>`
  259. Text :ref:`Color<class_Color>` used when the menu item is disabled.
  260. .. rst-class:: classref-item-separator
  261. ----
  262. .. _class_MenuBar_theme_color_font_focus_color:
  263. .. rst-class:: classref-themeproperty
  264. :ref:`Color<class_Color>` **font_focus_color** = ``Color(0.95, 0.95, 0.95, 1)`` :ref:`🔗<class_MenuBar_theme_color_font_focus_color>`
  265. Text :ref:`Color<class_Color>` used when the menu item is focused. Only replaces the normal text color of the menu item. Disabled, hovered, and pressed states take precedence over this color.
  266. .. rst-class:: classref-item-separator
  267. ----
  268. .. _class_MenuBar_theme_color_font_hover_color:
  269. .. rst-class:: classref-themeproperty
  270. :ref:`Color<class_Color>` **font_hover_color** = ``Color(0.95, 0.95, 0.95, 1)`` :ref:`🔗<class_MenuBar_theme_color_font_hover_color>`
  271. Text :ref:`Color<class_Color>` used when the menu item is being hovered.
  272. .. rst-class:: classref-item-separator
  273. ----
  274. .. _class_MenuBar_theme_color_font_hover_pressed_color:
  275. .. rst-class:: classref-themeproperty
  276. :ref:`Color<class_Color>` **font_hover_pressed_color** = ``Color(1, 1, 1, 1)`` :ref:`🔗<class_MenuBar_theme_color_font_hover_pressed_color>`
  277. Text :ref:`Color<class_Color>` used when the menu item is being hovered and pressed.
  278. .. rst-class:: classref-item-separator
  279. ----
  280. .. _class_MenuBar_theme_color_font_outline_color:
  281. .. rst-class:: classref-themeproperty
  282. :ref:`Color<class_Color>` **font_outline_color** = ``Color(0, 0, 0, 1)`` :ref:`🔗<class_MenuBar_theme_color_font_outline_color>`
  283. The tint of text outline of the menu item.
  284. .. rst-class:: classref-item-separator
  285. ----
  286. .. _class_MenuBar_theme_color_font_pressed_color:
  287. .. rst-class:: classref-themeproperty
  288. :ref:`Color<class_Color>` **font_pressed_color** = ``Color(1, 1, 1, 1)`` :ref:`🔗<class_MenuBar_theme_color_font_pressed_color>`
  289. Text :ref:`Color<class_Color>` used when the menu item is being pressed.
  290. .. rst-class:: classref-item-separator
  291. ----
  292. .. _class_MenuBar_theme_constant_h_separation:
  293. .. rst-class:: classref-themeproperty
  294. :ref:`int<class_int>` **h_separation** = ``4`` :ref:`🔗<class_MenuBar_theme_constant_h_separation>`
  295. The horizontal space between menu items.
  296. .. rst-class:: classref-item-separator
  297. ----
  298. .. _class_MenuBar_theme_constant_outline_size:
  299. .. rst-class:: classref-themeproperty
  300. :ref:`int<class_int>` **outline_size** = ``0`` :ref:`🔗<class_MenuBar_theme_constant_outline_size>`
  301. The size of the text outline.
  302. \ **Note:** If using a font with :ref:`FontFile.multichannel_signed_distance_field<class_FontFile_property_multichannel_signed_distance_field>` enabled, its :ref:`FontFile.msdf_pixel_range<class_FontFile_property_msdf_pixel_range>` must be set to at least *twice* the value of :ref:`outline_size<class_MenuBar_theme_constant_outline_size>` for outline rendering to look correct. Otherwise, the outline may appear to be cut off earlier than intended.
  303. .. rst-class:: classref-item-separator
  304. ----
  305. .. _class_MenuBar_theme_font_font:
  306. .. rst-class:: classref-themeproperty
  307. :ref:`Font<class_Font>` **font** :ref:`🔗<class_MenuBar_theme_font_font>`
  308. :ref:`Font<class_Font>` of the menu item's text.
  309. .. rst-class:: classref-item-separator
  310. ----
  311. .. _class_MenuBar_theme_font_size_font_size:
  312. .. rst-class:: classref-themeproperty
  313. :ref:`int<class_int>` **font_size** :ref:`🔗<class_MenuBar_theme_font_size_font_size>`
  314. Font size of the menu item's text.
  315. .. rst-class:: classref-item-separator
  316. ----
  317. .. _class_MenuBar_theme_style_disabled:
  318. .. rst-class:: classref-themeproperty
  319. :ref:`StyleBox<class_StyleBox>` **disabled** :ref:`🔗<class_MenuBar_theme_style_disabled>`
  320. :ref:`StyleBox<class_StyleBox>` used when the menu item is disabled.
  321. .. rst-class:: classref-item-separator
  322. ----
  323. .. _class_MenuBar_theme_style_disabled_mirrored:
  324. .. rst-class:: classref-themeproperty
  325. :ref:`StyleBox<class_StyleBox>` **disabled_mirrored** :ref:`🔗<class_MenuBar_theme_style_disabled_mirrored>`
  326. :ref:`StyleBox<class_StyleBox>` used when the menu item is disabled (for right-to-left layouts).
  327. .. rst-class:: classref-item-separator
  328. ----
  329. .. _class_MenuBar_theme_style_hover:
  330. .. rst-class:: classref-themeproperty
  331. :ref:`StyleBox<class_StyleBox>` **hover** :ref:`🔗<class_MenuBar_theme_style_hover>`
  332. :ref:`StyleBox<class_StyleBox>` used when the menu item is being hovered.
  333. .. rst-class:: classref-item-separator
  334. ----
  335. .. _class_MenuBar_theme_style_hover_mirrored:
  336. .. rst-class:: classref-themeproperty
  337. :ref:`StyleBox<class_StyleBox>` **hover_mirrored** :ref:`🔗<class_MenuBar_theme_style_hover_mirrored>`
  338. :ref:`StyleBox<class_StyleBox>` used when the menu item is being hovered (for right-to-left layouts).
  339. .. rst-class:: classref-item-separator
  340. ----
  341. .. _class_MenuBar_theme_style_hover_pressed:
  342. .. rst-class:: classref-themeproperty
  343. :ref:`StyleBox<class_StyleBox>` **hover_pressed** :ref:`🔗<class_MenuBar_theme_style_hover_pressed>`
  344. :ref:`StyleBox<class_StyleBox>` used when the menu item is being pressed and hovered at the same time.
  345. .. rst-class:: classref-item-separator
  346. ----
  347. .. _class_MenuBar_theme_style_hover_pressed_mirrored:
  348. .. rst-class:: classref-themeproperty
  349. :ref:`StyleBox<class_StyleBox>` **hover_pressed_mirrored** :ref:`🔗<class_MenuBar_theme_style_hover_pressed_mirrored>`
  350. :ref:`StyleBox<class_StyleBox>` used when the menu item is being pressed and hovered at the same time (for right-to-left layouts).
  351. .. rst-class:: classref-item-separator
  352. ----
  353. .. _class_MenuBar_theme_style_normal:
  354. .. rst-class:: classref-themeproperty
  355. :ref:`StyleBox<class_StyleBox>` **normal** :ref:`🔗<class_MenuBar_theme_style_normal>`
  356. Default :ref:`StyleBox<class_StyleBox>` for the menu item.
  357. .. rst-class:: classref-item-separator
  358. ----
  359. .. _class_MenuBar_theme_style_normal_mirrored:
  360. .. rst-class:: classref-themeproperty
  361. :ref:`StyleBox<class_StyleBox>` **normal_mirrored** :ref:`🔗<class_MenuBar_theme_style_normal_mirrored>`
  362. Default :ref:`StyleBox<class_StyleBox>` for the menu item (for right-to-left layouts).
  363. .. rst-class:: classref-item-separator
  364. ----
  365. .. _class_MenuBar_theme_style_pressed:
  366. .. rst-class:: classref-themeproperty
  367. :ref:`StyleBox<class_StyleBox>` **pressed** :ref:`🔗<class_MenuBar_theme_style_pressed>`
  368. :ref:`StyleBox<class_StyleBox>` used when the menu item is being pressed.
  369. .. rst-class:: classref-item-separator
  370. ----
  371. .. _class_MenuBar_theme_style_pressed_mirrored:
  372. .. rst-class:: classref-themeproperty
  373. :ref:`StyleBox<class_StyleBox>` **pressed_mirrored** :ref:`🔗<class_MenuBar_theme_style_pressed_mirrored>`
  374. :ref:`StyleBox<class_StyleBox>` used when the menu item is being pressed (for right-to-left layouts).
  375. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)`
  376. .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)`
  377. .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`
  378. .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)`
  379. .. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)`
  380. .. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)`
  381. .. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)`
  382. .. |void| replace:: :abbr:`void (No return value.)`