summaryrefslogtreecommitdiff
path: root/doc/classes/PopupMenu.xml
diff options
context:
space:
mode:
Diffstat (limited to 'doc/classes/PopupMenu.xml')
-rw-r--r--doc/classes/PopupMenu.xml94
1 files changed, 44 insertions, 50 deletions
diff --git a/doc/classes/PopupMenu.xml b/doc/classes/PopupMenu.xml
index bdb6ca84ee..ce55c90c68 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.2">
+<class name="PopupMenu" inherits="Popup" version="4.0">
<brief_description>
PopupMenu displays a list of options.
</brief_description>
@@ -42,7 +42,7 @@
<method name="add_icon_check_item">
<return type="void">
</return>
- <argument index="0" name="texture" type="Texture">
+ <argument index="0" name="texture" type="Texture2D">
</argument>
<argument index="1" name="label" type="String">
</argument>
@@ -59,7 +59,7 @@
<method name="add_icon_check_shortcut">
<return type="void">
</return>
- <argument index="0" name="texture" type="Texture">
+ <argument index="0" name="texture" type="Texture2D">
</argument>
<argument index="1" name="shortcut" type="ShortCut">
</argument>
@@ -76,7 +76,7 @@
<method name="add_icon_item">
<return type="void">
</return>
- <argument index="0" name="texture" type="Texture">
+ <argument index="0" name="texture" type="Texture2D">
</argument>
<argument index="1" name="label" type="String">
</argument>
@@ -92,7 +92,7 @@
<method name="add_icon_radio_check_item">
<return type="void">
</return>
- <argument index="0" name="texture" type="Texture">
+ <argument index="0" name="texture" type="Texture2D">
</argument>
<argument index="1" name="label" type="String">
</argument>
@@ -107,7 +107,7 @@
<method name="add_icon_radio_check_shortcut">
<return type="void">
</return>
- <argument index="0" name="texture" type="Texture">
+ <argument index="0" name="texture" type="Texture2D">
</argument>
<argument index="1" name="shortcut" type="ShortCut">
</argument>
@@ -122,7 +122,7 @@
<method name="add_icon_shortcut">
<return type="void">
</return>
- <argument index="0" name="texture" type="Texture">
+ <argument index="0" name="texture" type="Texture2D">
</argument>
<argument index="1" name="shortcut" type="ShortCut">
</argument>
@@ -242,6 +242,12 @@
Removes all items from the [PopupMenu].
</description>
</method>
+ <method name="get_current_index" qualifiers="const">
+ <return type="int">
+ </return>
+ <description>
+ </description>
+ </method>
<method name="get_item_accelerator" qualifiers="const">
<return type="int">
</return>
@@ -259,7 +265,7 @@
</description>
</method>
<method name="get_item_icon" qualifiers="const">
- <return type="Texture">
+ <return type="Texture2D">
</return>
<argument index="0" name="idx" type="int">
</argument>
@@ -330,13 +336,6 @@
Returns the tooltip associated with the specified index index [code]idx[/code].
</description>
</method>
- <method name="is_hide_on_window_lose_focus" qualifiers="const">
- <return type="bool">
- </return>
- <description>
- Returns whether the popup will be hidden when the window loses focus or not.
- </description>
- </method>
<method name="is_item_checkable" qualifiers="const">
<return type="bool">
</return>
@@ -391,7 +390,7 @@
<argument index="0" name="idx" type="int">
</argument>
<description>
- Returns whether the shortcut of the specified item [code]idx[/code] is disabled or not.
+ Returns [code]true[/code] if the specified item's shortcut is disabled.
</description>
</method>
<method name="remove_item">
@@ -404,15 +403,6 @@
[b]Note:[/b] The indices of items after the removed item will 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>
- Hides the [PopupMenu] when the window loses focus.
- </description>
- </method>
<method name="set_item_accelerator">
<return type="void">
</return>
@@ -477,7 +467,7 @@
<argument index="1" name="disabled" type="bool">
</argument>
<description>
- Sets whether the item at index [code]idx[/code] is disabled or not. When it is disabled, it can't be selected and its action can't be invoked.
+ Enables/disables the item at index [code]idx[/code]. When it is disabled, it can't be selected and its action can't be invoked.
</description>
</method>
<method name="set_item_icon">
@@ -485,10 +475,10 @@
</return>
<argument index="0" name="idx" type="int">
</argument>
- <argument index="1" name="icon" type="Texture">
+ <argument index="1" name="icon" type="Texture2D">
</argument>
<description>
- Replaces the [Texture] icon of the specified [code]idx[/code].
+ Replaces the [Texture2D] icon of the specified [code]idx[/code].
</description>
</method>
<method name="set_item_id">
@@ -521,6 +511,7 @@
<argument index="1" name="state" type="int">
</argument>
<description>
+ Sets the state of an multistate item. See [method add_multistate_item] for details.
</description>
</method>
<method name="set_item_shortcut">
@@ -595,14 +586,14 @@
<argument index="0" name="idx" type="int">
</argument>
<description>
+ Cycle to the next state of an multistate item. See [method add_multistate_item] for details.
</description>
</method>
</methods>
<members>
- <member name="allow_search" type="bool" setter="set_allow_search" getter="get_allow_search" default="false">
+ <member name="allow_search" type="bool" setter="set_allow_search" getter="get_allow_search" default="true">
If [code]true[/code], allows to navigate [PopupMenu] with letter keys.
</member>
- <member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" override="true" enum="Control.FocusMode" default="2" />
<member name="hide_on_checkable_item_selection" type="bool" setter="set_hide_on_checkable_item_selection" getter="is_hide_on_checkable_item_selection" default="true">
If [code]true[/code], hides the [PopupMenu] when a checkbox or radio button is selected.
</member>
@@ -642,56 +633,59 @@
<constants>
</constants>
<theme_items>
- <theme_item name="checked" type="Texture">
- Sets a custom [Texture] icon for [code]checked[/code] state of checkbox items.
+ <theme_item name="checked" type="Texture2D">
+ [Texture2D] icon for the checked checkbox items.
</theme_item>
<theme_item name="font" type="Font">
- Sets a custom [Font].
+ [Font] used for the menu items.
</theme_item>
<theme_item name="font_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )">
- Sets a custom [Color] for the [Font].
+ The default text [Color] for menu items' names.
</theme_item>
<theme_item name="font_color_accel" type="Color" default="Color( 0.7, 0.7, 0.7, 0.8 )">
+ The text [Color] used for shortcuts and accelerators that show next to the menu item name when defined. See [method get_item_accelerator] for more info on accelerators.
</theme_item>
<theme_item name="font_color_disabled" type="Color" default="Color( 0.4, 0.4, 0.4, 0.8 )">
- Sets a custom [Color] for disabled text.
+ [Color] used for disabled menu items' text.
</theme_item>
<theme_item name="font_color_hover" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )">
- Sets a custom [Color] for the hovered text.
+ [Color] used for the hovered text.
</theme_item>
<theme_item name="hover" type="StyleBox">
- Sets a custom [StyleBox] when the [PopupMenu] is hovered.
+ [StyleBox] displayed when the [PopupMenu] item is hovered.
</theme_item>
<theme_item name="hseparation" type="int" default="4">
- Sets the horizontal space separation between each item.
+ The horizontal space between the item's name and the shortcut text/submenu arrow.
</theme_item>
<theme_item name="labeled_separator_left" type="StyleBox">
+ [StyleBox] for the left side of labeled separator. See [method add_separator].
</theme_item>
<theme_item name="labeled_separator_right" type="StyleBox">
+ [StyleBox] for the right side of labeled separator. See [method add_separator].
</theme_item>
<theme_item name="panel" type="StyleBox">
- Sets a custom [StyleBox] for the panel of the [PopupMenu].
+ Default [StyleBox] of the [PopupMenu] items.
</theme_item>
<theme_item name="panel_disabled" type="StyleBox">
- Sets a custom [StyleBox] for the panel of the [PopupMenu], when the panel is disabled.
+ [StyleBox] used when the [PopupMenu] item is disabled.
</theme_item>
- <theme_item name="radio_checked" type="Texture">
- Sets a custom [Texture] icon for [code]checked[/code] of radio button items.
+ <theme_item name="radio_checked" type="Texture2D">
+ [Texture2D] icon for the checked radio button items.
</theme_item>
- <theme_item name="radio_unchecked" type="Texture">
- Sets a custom [Texture] icon for [code]unchecked[/code] of radio button items.
+ <theme_item name="radio_unchecked" type="Texture2D">
+ [Texture2D] icon for the unchecked radio button items.
</theme_item>
<theme_item name="separator" type="StyleBox">
- Sets a custom [StyleBox] for separator's.
+ [StyleBox] used for the separators. See [method add_separator].
</theme_item>
- <theme_item name="submenu" type="Texture">
- Sets a custom [Texture] for submenu's.
+ <theme_item name="submenu" type="Texture2D">
+ [Texture2D] icon for the submenu arrow.
</theme_item>
- <theme_item name="unchecked" type="Texture">
- Sets a custom [Texture] icon for [code]unchecked[/code] of checkbox items.
+ <theme_item name="unchecked" type="Texture2D">
+ [Texture2D] icon for the unchecked checkbox items.
</theme_item>
<theme_item name="vseparation" type="int" default="4">
- Sets the vertical space separation between each item.
+ The vertical space between each menu item.
</theme_item>
</theme_items>
</class>