classref: Sync with current master branch (543750a)

This commit is contained in:
Godot Organization
2023-06-03 03:19:05 +00:00
parent 2de3798d56
commit f9340bddb2
340 changed files with 1505 additions and 1258 deletions

View File

@@ -12,16 +12,14 @@ MenuButton
**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>`
Special button that brings up a :ref:`PopupMenu<class_PopupMenu>` when clicked.
A button that brings up a :ref:`PopupMenu<class_PopupMenu>` when clicked.
.. rst-class:: classref-introduction-group
Description
-----------
Special button that brings up a :ref:`PopupMenu<class_PopupMenu>` when clicked.
New items can be created inside this :ref:`PopupMenu<class_PopupMenu>` using ``get_popup().add_item("My Item Name")``. You can also create them directly from the editor. To do so, select the **MenuButton** node, then in the toolbar at the top of the 2D editor, click **Items** then click **Add** in the popup. You will be able to give each item new properties.
A button that brings up a :ref:`PopupMenu<class_PopupMenu>` when clicked. To create new items inside this :ref:`PopupMenu<class_PopupMenu>`, use ``get_popup().add_item("My Item Name")``. You can also create them directly from Godot editor's inspector.
See also :ref:`BaseButton<class_BaseButton>` which contains common properties and methods associated with this node.