:github_url: hide .. Generated automatically by doc/tools/makerst.py in Godot's source tree. .. DO NOT EDIT THIS FILE, but the MenuButton.xml source instead. .. The source is found in doc/classes or modules//doc_classes. .. _class_MenuButton: MenuButton ========== **Inherits:** :ref:`Button` **<** :ref:`BaseButton` **<** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` **Category:** Core Brief Description ----------------- Special button that brings up a :ref:`PopupMenu` when clicked. Properties ---------- +-------------------------+-------------------------------------------------------------------+ | :ref:`bool` | :ref:`switch_on_hover` | +-------------------------+-------------------------------------------------------------------+ Methods ------- +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------+ | :ref:`PopupMenu` | :ref:`get_popup` **(** **)** const | +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`set_disable_shortcuts` **(** :ref:`bool` disabled **)** | +-----------------------------------+--------------------------------------------------------------------------------------------------------------------------+ Theme Properties ---------------- +---------------------------------+---------------------+ | :ref:`StyleBox` | disabled | +---------------------------------+---------------------+ | :ref:`StyleBox` | focus | +---------------------------------+---------------------+ | :ref:`Font` | font | +---------------------------------+---------------------+ | :ref:`Color` | font_color | +---------------------------------+---------------------+ | :ref:`Color` | font_color_disabled | +---------------------------------+---------------------+ | :ref:`Color` | font_color_hover | +---------------------------------+---------------------+ | :ref:`Color` | font_color_pressed | +---------------------------------+---------------------+ | :ref:`StyleBox` | hover | +---------------------------------+---------------------+ | :ref:`int` | hseparation | +---------------------------------+---------------------+ | :ref:`StyleBox` | normal | +---------------------------------+---------------------+ | :ref:`StyleBox` | pressed | +---------------------------------+---------------------+ Signals ------- .. _class_MenuButton_signal_about_to_show: - **about_to_show** **(** **)** Emitted when :ref:`PopupMenu` of this MenuButton is about to show. Description ----------- Special button that brings up a :ref:`PopupMenu` when clicked. That's pretty much all it does, as it's just a helper class when building GUIs. Property Descriptions --------------------- .. _class_MenuButton_property_switch_on_hover: - :ref:`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 ------------------- .. _class_MenuButton_method_get_popup: - :ref:`PopupMenu` **get_popup** **(** **)** const Returns the :ref:`PopupMenu` contained in this button. ---- .. _class_MenuButton_method_set_disable_shortcuts: - void **set_disable_shortcuts** **(** :ref:`bool` disabled **)**