MenuButton
Inherits: Button < BaseButton < Control < CanvasItem < Node < Object
Category: Core
Brief Description
Special button that brings up a PopupMenu when clicked.
Properties
bool | switch_on_hover |
Methods
PopupMenu | get_popup ( ) const |
void | set_disable_shortcuts ( bool disabled ) |
Theme Properties
StyleBox | disabled |
StyleBox | focus |
Font | font |
Color | font_color |
Color | font_color_disabled |
Color | font_color_hover |
Color | font_color_pressed |
StyleBox | hover |
int | hseparation |
StyleBox | normal |
StyleBox | pressed |
Signals
- about_to_show ( )
Emitted when PopupMenu of this MenuButton is about to show.
Description
Special button that brings up a PopupMenu when clicked. That’s pretty much all it does, as it’s just a helper class when building GUIs.
Property Descriptions
- bool switch_on_hover
Setter | set_switch_on_hover(value) |
Getter | is_switch_on_hover() |
If true
, when the cursor hovers above another MenuButton within the same parent which also has switch_on_hover
enabled, it will close the current MenuButton and open the other one.
Method Descriptions
- PopupMenu get_popup ( ) const
Returns the PopupMenu contained in this button.
- void set_disable_shortcuts ( bool disabled )