diff options
Diffstat (limited to 'doc/classes/PopupMenu.xml')
-rw-r--r-- | doc/classes/PopupMenu.xml | 104 |
1 files changed, 101 insertions, 3 deletions
diff --git a/doc/classes/PopupMenu.xml b/doc/classes/PopupMenu.xml index 62911c1cf7..fe7dbe52b0 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.1-dev"> +<class name="PopupMenu" inherits="Popup" category="Core" version="3.1"> <brief_description> PopupMenu displays a list of options. </brief_description> @@ -108,9 +108,36 @@ 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> + <argument index="0" name="label" type="String" default=""""> + </argument> <description> Add a separator between items. Separators also occupy an index. </description> @@ -233,13 +260,19 @@ <description> </description> </method> + <method name="is_hide_on_window_lose_focus" 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"> @@ -248,7 +281,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"> @@ -260,6 +293,15 @@ 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_radio_checkable" qualifiers="const"> + <return type="bool"> + </return> + <argument index="0" name="idx" type="int"> + </argument> + <description> + 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="is_item_separator" qualifiers="const"> <return type="bool"> </return> @@ -269,6 +311,14 @@ Return whether the item is a separator. If it is, it would be displayed as a line. </description> </method> + <method name="is_item_shortcut_disabled" qualifiers="const"> + <return type="bool"> + </return> + <argument index="0" name="idx" type="int"> + </argument> + <description> + </description> + </method> <method name="remove_item"> <return type="void"> </return> @@ -278,6 +328,14 @@ 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_window_lose_focus"> + <return type="void"> + </return> + <argument index="0" name="enable" type="bool"> + </argument> + <description> + </description> + </method> <method name="set_item_accelerator"> <return type="void"> </return> @@ -300,6 +358,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> @@ -387,6 +457,16 @@ <description> </description> </method> + <method name="set_item_shortcut_disabled"> + <return type="void"> + </return> + <argument index="0" name="idx" type="int"> + </argument> + <argument index="1" name="disabled" type="bool"> + </argument> + <description> + </description> + </method> <method name="set_item_submenu"> <return type="void"> </return> @@ -443,8 +523,18 @@ </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> + <member name="submenu_popup_delay" type="float" setter="set_submenu_popup_delay" getter="get_submenu_popup_delay"> + Sets the delay time for the submenu item to popup on mouse hovering. If the popup menu is added as a child of another (acting as a submenu), it will inherit the delay time of the parent menu item. Default value: [code]0.3[/code] seconds. + </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> @@ -479,10 +569,18 @@ </theme_item> <theme_item name="hseparation" type="int"> </theme_item> + <theme_item name="labeled_separator_left" type="StyleBox"> + </theme_item> + <theme_item name="labeled_separator_right" type="StyleBox"> + </theme_item> <theme_item name="panel" type="StyleBox"> </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"> |