Inherits: Control < CanvasItem < Node < Object
A horizontal menu bar that creates a MenuButton for each PopupMenu child.
A horizontal menu bar that creates a MenuButton for each PopupMenu child. New items are created by adding PopupMenus to this node.
| ||
| ||
| ||
| ||
| ||
|
get_menu_count ( ) const | |
get_menu_popup ( int menu ) const | |
get_menu_title ( int menu ) const | |
get_menu_tooltip ( int menu ) const | |
is_menu_disabled ( int menu ) const | |
is_menu_hidden ( int menu ) const | |
is_native_menu ( ) const | |
void | set_disable_shortcuts ( bool disabled ) |
void | set_menu_disabled ( int menu, bool disabled ) |
void | set_menu_hidden ( int menu, bool hidden ) |
void | set_menu_title ( int menu, String title ) |
void | set_menu_tooltip ( int menu, String tooltip ) |
| ||
| ||
| ||
| ||
| ||
| ||
| ||
| ||
| ||
false
Flat MenuBar don't display item decoration.
""
Language code used for line-breaking and text shaping algorithms, if left empty current locale is used instead.
true
If true, MenuBar will use system global menu when supported.
-1
Position in the global menu to insert first MenuBar item at.
true
If true, when the cursor hovers above menu item, it will close the current PopupMenu and open the other one.
0
Base text writing direction.
Returns number of menu items.
Returns PopupMenu associated with menu item.
Returns menu item title.
Returns menu item tooltip.
Returns true, if menu item is disabled.
Returns true, if menu item is hidden.
Returns true, if system global menu is supported and used by this MenuBar.
If true, shortcuts are disabled and cannot be used to trigger the button.
If true, menu item is disabled.
If true, menu item is hidden.
Sets menu item title.
Sets menu item tooltip.
Color(0.875, 0.875, 0.875, 1)
Default text Color of the menu item.
Color(0.875, 0.875, 0.875, 0.5)
Text Color used when the menu item is disabled.
Color(0.95, 0.95, 0.95, 1)
Text 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.
Color(0.95, 0.95, 0.95, 1)
Text Color used when the menu item is being hovered.
Color(1, 1, 1, 1)
Text Color used when the menu item is being hovered and pressed.
Color(1, 1, 1, 1)
The tint of text outline of the menu item.
Color(1, 1, 1, 1)
Text Color used when the menu item is being pressed.
4
The horizontal space between menu items.
0
The size of the text outline.
Note: If using a font with FontFile.multichannel_signed_distance_field enabled, its FontFile.msdf_pixel_range must be set to at least twice the value of outline_size for outline rendering to look correct. Otherwise, the outline may appear to be cut off earlier than intended.
Font of the menu item's text.
Font size of the menu item's text.
StyleBox used when the menu item is disabled.
StyleBox used when the menu item is disabled (for right-to-left layouts).
StyleBox used when the menu item is being hovered.
StyleBox used when the menu item is being hovered (for right-to-left layouts).
StyleBox used when the menu item is being pressed and hovered at the same time.
StyleBox used when the menu item is being pressed and hovered at the same time (for right-to-left layouts).
Default StyleBox for the menu item.
Default StyleBox for the menu item (for right-to-left layouts).
StyleBox used when the menu item is being pressed.
StyleBox used when the menu item is being pressed (for right-to-left layouts).
© 2014–present Juan Linietsky, Ariel Manzur and the Godot community
Licensed under the Creative Commons Attribution Unported License v3.0.
https://docs.godotengine.org/en/4.2/classes/class_menubar.html