class_menubutton.rst 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. .. Generated automatically by doc/tools/makerst.py in Godot's source tree.
  2. .. DO NOT EDIT THIS FILE, but the MenuButton.xml source instead.
  3. .. The source is found in doc/classes or modules/<name>/doc_classes.
  4. .. _class_MenuButton:
  5. MenuButton
  6. ==========
  7. **Inherits:** :ref:`Button<class_button>` **<** :ref:`BaseButton<class_basebutton>` **<** :ref:`Control<class_control>` **<** :ref:`CanvasItem<class_canvasitem>` **<** :ref:`Node<class_node>` **<** :ref:`Object<class_object>`
  8. **Category:** Core
  9. Brief Description
  10. -----------------
  11. Special button that brings up a :ref:`PopupMenu<class_popupmenu>` when clicked.
  12. Member Functions
  13. ----------------
  14. +------------------------------------+-------------------------------------------------------------------------------------------------------------------+
  15. | :ref:`PopupMenu<class_popupmenu>` | :ref:`get_popup<class_MenuButton_get_popup>` **(** **)** const |
  16. +------------------------------------+-------------------------------------------------------------------------------------------------------------------+
  17. | void | :ref:`set_disable_shortcuts<class_MenuButton_set_disable_shortcuts>` **(** :ref:`bool<class_bool>` disabled **)** |
  18. +------------------------------------+-------------------------------------------------------------------------------------------------------------------+
  19. Signals
  20. -------
  21. .. _class_MenuButton_about_to_show:
  22. - **about_to_show** **(** **)**
  23. Emitted when :ref:`PopupMenu<class_popupmenu>` of this MenuButton is about to show.
  24. Description
  25. -----------
  26. Special button that brings up a :ref:`PopupMenu<class_popupmenu>` when clicked. That's pretty much all it does, as it's just a helper class when building GUIs.
  27. Member Function Description
  28. ---------------------------
  29. .. _class_MenuButton_get_popup:
  30. - :ref:`PopupMenu<class_popupmenu>` **get_popup** **(** **)** const
  31. Return the :ref:`PopupMenu<class_popupmenu>` contained in this button.
  32. .. _class_MenuButton_set_disable_shortcuts:
  33. - void **set_disable_shortcuts** **(** :ref:`bool<class_bool>` disabled **)**