mirror of
https://github.com/godotengine/godot.git
synced 2026-01-06 10:11:57 +03:00
PopupMenu upgrade: Hide on item selection (#7306)
* Added the option to set hide on item selection. Usable in GDScript and from within the source code when you want to specify popup menus you don't want to close immediately when selecting an item
* Renamed getter from get_ to is_, fixed parent/child behavior, renamed bool variable to match most code and added ADD_PROPERTYNO to save some memory
(cherry picked from commit da950cd0f2)
This commit is contained in:
committed by
Rémi Verschelde
parent
2fbae72d14
commit
0701e7c2d8
@@ -30174,6 +30174,13 @@
|
||||
Clear the popup menu, in effect removing all items.
|
||||
</description>
|
||||
</method>
|
||||
<method name="is_hide_on_item_selection">
|
||||
<return type="bool">
|
||||
</return>
|
||||
<description>
|
||||
Returns a boolean that indicates whether or not the PopupMenu will hide on item selection.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_item_ID" qualifiers="const">
|
||||
<return type="int">
|
||||
</return>
|
||||
@@ -30301,6 +30308,13 @@
|
||||
Removes the item at index "idx" from the menu. Note that the indexes of items after the removed item are going to be shifted by one.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_hide_on_item_selection">
|
||||
<argument index="0" name="enable" type="bool">
|
||||
</argument>
|
||||
<description>
|
||||
Sets whether or not the PopupMenu will hide on item selection.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_item_ID">
|
||||
<argument index="0" name="idx" type="int">
|
||||
</argument>
|
||||
|
||||
Reference in New Issue
Block a user