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.xml20
1 files changed, 18 insertions, 2 deletions
diff --git a/doc/classes/PopupMenu.xml b/doc/classes/PopupMenu.xml
index f8f16acb06..73413b379e 100644
--- a/doc/classes/PopupMenu.xml
+++ b/doc/classes/PopupMenu.xml
@@ -8,6 +8,7 @@
The size of a [PopupMenu] can be limited by using [member Window.max_size]. If the height of the list of items is larger than the maximum height of the [PopupMenu], a [ScrollContainer] within the popup will allow the user to scroll the contents.
If no maximum size is set, or if it is set to 0, the [PopupMenu] height will be limited by its parent rect.
All [code]set_*[/code] methods allow negative item index, which makes the item accessed from the last one.
+ [b]Incremental search:[/b] Like [ItemList] and [Tree], [PopupMenu] supports searching within the list while the control is focused. Press a key that matches the first letter of an item's name to select the first item starting with the given letter. After that point, there are two ways to perform incremental search: 1) Press the same key again before the timeout duration to select the next item starting with the same letter. 2) Press letter keys that match the rest of the word before the timeout duration to match to select the item in question directly. Both of these actions will be reset to the beginning of the list if the timeout duration has passed since the last keystroke was registered. You can adjust the timeout duration by changing [member ProjectSettings.gui/timers/incremental_search_max_interval_msec].
</description>
<tutorials>
</tutorials>
@@ -201,6 +202,13 @@
Returns the accelerator of the item at the given [code]index[/code]. Accelerators are special combinations of keys that activate the item, no matter which control is focused.
</description>
</method>
+ <method name="get_item_horizontal_offset" qualifiers="const">
+ <return type="int" />
+ <argument index="0" name="index" type="int" />
+ <description>
+ Returns the horizontal offset of the item at the given [code]index[/code].
+ </description>
+ </method>
<method name="get_item_icon" qualifiers="const">
<return type="Texture2D" />
<argument index="0" name="index" type="int" />
@@ -395,6 +403,14 @@
Enables/disables the item at the given [code]index[/code]. When it is disabled, it can't be selected and its action can't be invoked.
</description>
</method>
+ <method name="set_item_horizontal_offset">
+ <return type="void" />
+ <argument index="0" name="index" type="int" />
+ <argument index="1" name="offset" type="int" />
+ <description>
+ Sets the horizontal offset of the item at the given [code]index[/code].
+ </description>
+ </method>
<method name="set_item_icon">
<return type="void" />
<argument index="0" name="index" type="int" />
@@ -571,7 +587,7 @@
<theme_item name="font_separator_outline_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)">
The tint of text outline of the labeled separator.
</theme_item>
- <theme_item name="hseparation" data_type="constant" type="int" default="4">
+ <theme_item name="h_separation" data_type="constant" type="int" default="4">
The horizontal space between the item's elements.
</theme_item>
<theme_item name="item_end_padding" data_type="constant" type="int" default="2">
@@ -584,7 +600,7 @@
<theme_item name="separator_outline_size" data_type="constant" type="int" default="0">
The size of the labeled separator text outline.
</theme_item>
- <theme_item name="vseparation" data_type="constant" type="int" default="4">
+ <theme_item name="v_separation" data_type="constant" type="int" default="4">
The vertical space between each menu item.
</theme_item>
<theme_item name="font" data_type="font" type="Font">