summaryrefslogtreecommitdiff
path: root/doc/classes/ItemList.xml
diff options
context:
space:
mode:
Diffstat (limited to 'doc/classes/ItemList.xml')
-rw-r--r--doc/classes/ItemList.xml105
1 files changed, 96 insertions, 9 deletions
diff --git a/doc/classes/ItemList.xml b/doc/classes/ItemList.xml
index 25420bd77b..0fd0fe7b3d 100644
--- a/doc/classes/ItemList.xml
+++ b/doc/classes/ItemList.xml
@@ -43,6 +43,15 @@
Removes all items from the list.
</description>
</method>
+ <method name="clear_item_opentype_features">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ Removes all OpenType features from the item's text.
+ </description>
+ </method>
<method name="ensure_current_is_visible">
<return type="void">
</return>
@@ -114,6 +123,15 @@
Returns the region of item's icon used. The whole icon will be used if the region has no area.
</description>
</method>
+ <method name="get_item_language" qualifiers="const">
+ <return type="String">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ Returns item's text language code.
+ </description>
+ </method>
<method name="get_item_metadata" qualifiers="const">
<return type="Variant">
</return>
@@ -123,6 +141,17 @@
Returns the metadata value of the specified index.
</description>
</method>
+ <method name="get_item_opentype_feature" qualifiers="const">
+ <return type="int">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="tag" type="String">
+ </argument>
+ <description>
+ Returns OpenType feature [code]tag[/code] of the item's text.
+ </description>
+ </method>
<method name="get_item_text" qualifiers="const">
<return type="String">
</return>
@@ -132,6 +161,15 @@
Returns the text associated with the specified index.
</description>
</method>
+ <method name="get_item_text_direction" qualifiers="const">
+ <return type="int" enum="Control.TextDirection">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <description>
+ Returns item's text base writing direction.
+ </description>
+ </method>
<method name="get_item_tooltip" qualifiers="const">
<return type="String">
</return>
@@ -247,11 +285,16 @@
<argument index="1" name="custom_bg_color" type="Color">
</argument>
<description>
- Sets the background color of the item specified by [code]idx[/code] index to the specified [Color].
- [codeblock]
- var some_string = "Some text"
- some_string.set_item_custom_bg_color(0,Color(1, 0, 0, 1) # This will set the background color of the first item of the control to red.
- [/codeblock]
+ [codeblocks]
+ [gdscript]
+ var itemList = ItemList.new()
+ some_string.set_item_custom_bg_color(0, Color.red) # This will set the background color of the first item of the control to red.
+ [/gdscript]
+ [csharp]
+ var itemList = new ItemList();
+ itemList.SetItemCustomBgColor(0, Colors.Red); // This will set the background color of the first item of the control to red.
+ [/csharp]
+ [/codeblocks]
</description>
</method>
<method name="set_item_custom_fg_color">
@@ -263,10 +306,16 @@
</argument>
<description>
Sets the foreground color of the item specified by [code]idx[/code] index to the specified [Color].
- [codeblock]
- var some_string = "Some text"
- some_string.set_item_custom_fg_color(0,Color(1, 0, 0, 1) # This will set the foreground color of the first item of the control to red.
- [/codeblock]
+ [codeblocks]
+ [gdscript]
+ var item_list = ItemList.new()
+ item_list.set_item_custom_fg_color(0, Color.red) # This will set the foreground color of the first item of the control to red.
+ [/gdscript]
+ [csharp]
+ var itemList = new ItemList();
+ itemList.SetItemCustomFgColor(0, Colors.Red); // This will set the foreground color of the first item of the control to red.
+ [/csharp]
+ [/codeblocks]
</description>
</method>
<method name="set_item_disabled">
@@ -325,6 +374,17 @@
Sets whether the item icon will be drawn transposed.
</description>
</method>
+ <method name="set_item_language">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="language" type="String">
+ </argument>
+ <description>
+ Sets language code of item's text used for line-breaking and text shaping algorithms, if left empty current locale is used instead.
+ </description>
+ </method>
<method name="set_item_metadata">
<return type="void">
</return>
@@ -336,6 +396,19 @@
Sets a value (of any type) to be stored with the item associated with the specified index.
</description>
</method>
+ <method name="set_item_opentype_feature">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="tag" type="String">
+ </argument>
+ <argument index="2" name="value" type="int">
+ </argument>
+ <description>
+ Sets OpenType feature [code]tag[/code] for the item's text. More info: [url=https://docs.microsoft.com/en-us/typography/opentype/spec/featuretags]OpenType feature tags[/url].
+ </description>
+ </method>
<method name="set_item_selectable">
<return type="void">
</return>
@@ -358,6 +431,17 @@
Sets text of the item associated with the specified index.
</description>
</method>
+ <method name="set_item_text_direction">
+ <return type="void">
+ </return>
+ <argument index="0" name="idx" type="int">
+ </argument>
+ <argument index="1" name="direction" type="int" enum="Control.TextDirection">
+ </argument>
+ <description>
+ Sets item's text base writing direction.
+ </description>
+ </method>
<method name="set_item_tooltip">
<return type="void">
</return>
@@ -533,6 +617,9 @@
<theme_item name="font_color_selected" type="Color" default="Color( 1, 1, 1, 1 )">
Text [Color] used when the item is selected.
</theme_item>
+ <theme_item name="font_size" type="int">
+ Font size of the item's text.
+ </theme_item>
<theme_item name="guide_color" type="Color" default="Color( 0, 0, 0, 0.1 )">
[Color] of the guideline. The guideline is a line drawn between each row of items.
</theme_item>