diff options
Diffstat (limited to 'doc/classes/PopupMenu.xml')
-rw-r--r-- | doc/classes/PopupMenu.xml | 79 |
1 files changed, 62 insertions, 17 deletions
diff --git a/doc/classes/PopupMenu.xml b/doc/classes/PopupMenu.xml index 13cf16d2ee..166a4be2b0 100644 --- a/doc/classes/PopupMenu.xml +++ b/doc/classes/PopupMenu.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="PopupMenu" inherits="Popup" category="Core" version="3.0-beta"> +<class name="PopupMenu" inherits="Popup" category="Core" version="3.1"> <brief_description> PopupMenu displays a list of options. </brief_description> @@ -108,6 +108,31 @@ Add a new item with text "label". An id can optionally be provided, as well as an accelerator keybinding. If no id is provided, one will be created from the index. </description> </method> + <method name="add_radio_check_item"> + <return type="void"> + </return> + <argument index="0" name="label" type="String"> + </argument> + <argument index="1" name="id" type="int" default="-1"> + </argument> + <argument index="2" name="accel" type="int" default="0"> + </argument> + <description> + The same as [method add_check_item] but the inserted item will look as a radio button. Remember this is just cosmetic and you have to add the logic for checking/unchecking items in radio groups. + </description> + </method> + <method name="add_radio_check_shortcut"> + <return type="void"> + </return> + <argument index="0" name="shortcut" type="ShortCut"> + </argument> + <argument index="1" name="id" type="int" default="-1"> + </argument> + <argument index="2" name="global" type="bool" default="false"> + </argument> + <description> + </description> + </method> <method name="add_separator"> <return type="void"> </return> @@ -233,19 +258,13 @@ <description> </description> </method> - <method name="is_hide_on_state_item_selection" qualifiers="const"> - <return type="bool"> - </return> - <description> - </description> - </method> <method name="is_item_checkable" qualifiers="const"> <return type="bool"> </return> <argument index="0" name="idx" type="int"> </argument> <description> - Return whether the item at index "idx" has a checkbox. Note that checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. + Return whether the item at index "idx" is checkable in some way, i.e., whether has a checkbox or radio button. Note that checkable items just display a checkmark or radio button, but don't have any built-in checking behavior and must be checked/unchecked manually. </description> </method> <method name="is_item_checked" qualifiers="const"> @@ -254,7 +273,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> - Return the checkstate status of the item at index "idx". + Return whether the item at index "idx" is checked. </description> </method> <method name="is_item_disabled" qualifiers="const"> @@ -266,30 +285,31 @@ Return whether the item at index "idx" is disabled. When it is disabled it can't be selected, or its action invoked. </description> </method> - <method name="is_item_separator" qualifiers="const"> + <method name="is_item_radio_checkable" qualifiers="const"> <return type="bool"> </return> <argument index="0" name="idx" type="int"> </argument> <description> - Return whether the item is a seperator. If it is, it would be displayed as a line. + Return whether the item at index "idx" has radio-button-style checkability. Remember this is just cosmetic and you have to add the logic for checking/unchecking items in radio groups. </description> </method> - <method name="remove_item"> - <return type="void"> + <method name="is_item_separator" qualifiers="const"> + <return type="bool"> </return> <argument index="0" name="idx" type="int"> </argument> <description> - 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. + Return whether the item is a separator. If it is, it would be displayed as a line. </description> </method> - <method name="set_hide_on_state_item_selection"> + <method name="remove_item"> <return type="void"> </return> - <argument index="0" name="enable" type="bool"> + <argument index="0" name="idx" type="int"> </argument> <description> + 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_item_accelerator"> @@ -314,6 +334,18 @@ Set whether the item at index "idx" has a checkbox. Note that checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. </description> </method> + <method name="set_item_as_radio_checkable"> + <return type="void"> + </return> + <argument index="0" name="idx" type="int"> + </argument> + <argument index="1" name="enable" type="bool"> + </argument> + <description> + The same as [method set_item_as_checkable] but placing a radio button in case of enabling. If used for disabling, it's the same. + Remember this is just cosmetic and you have to add the logic for checking/unchecking items in radio groups. + </description> + </method> <method name="set_item_as_separator"> <return type="void"> </return> @@ -322,7 +354,7 @@ <argument index="1" name="enable" type="bool"> </argument> <description> - Mark the item at index "idx" as a seperator, which means that it would be displayed as a mere line. + Mark the item at index "idx" as a separator, which means that it would be displayed as a mere line. </description> </method> <method name="set_item_checked"> @@ -455,8 +487,17 @@ </member> <member name="hide_on_item_selection" type="bool" setter="set_hide_on_item_selection" getter="is_hide_on_item_selection"> </member> + <member name="hide_on_state_item_selection" type="bool" setter="set_hide_on_state_item_selection" getter="is_hide_on_state_item_selection"> + </member> </members> <signals> + <signal name="id_focused"> + <argument index="0" name="ID" type="int"> + </argument> + <description> + This event is emitted when user navigated to an item of some id using [code]ui_up[/code] or [code]ui_down[/code] action. + </description> + </signal> <signal name="id_pressed"> <argument index="0" name="ID" type="int"> </argument> @@ -495,6 +536,10 @@ </theme_item> <theme_item name="panel_disabled" type="StyleBox"> </theme_item> + <theme_item name="radio_checked" type="Texture"> + </theme_item> + <theme_item name="radio_unchecked" type="Texture"> + </theme_item> <theme_item name="separator" type="StyleBox"> </theme_item> <theme_item name="submenu" type="Texture"> |