Merge pull request #97519 from timothyqiu/itemlist-at

Add auto translate mode for items in `ItemList`
This commit is contained in:
Rémi Verschelde 2024-10-03 15:39:23 +02:00
commit 5314793ac7
No known key found for this signature in database
GPG key ID: C3336907360768E1
3 changed files with 64 additions and 5 deletions

View file

@ -73,6 +73,13 @@
[b]Note:[/b] The returned value is unreliable if called right after modifying the [ItemList], before it redraws in the next frame.
</description>
</method>
<method name="get_item_auto_translate_mode" qualifiers="const">
<return type="int" enum="Node.AutoTranslateMode" />
<param index="0" name="idx" type="int" />
<description>
Returns item's auto translate mode.
</description>
</method>
<method name="get_item_custom_bg_color" qualifiers="const">
<return type="Color" />
<param index="0" name="idx" type="int" />
@ -230,6 +237,15 @@
[b]Note:[/b] This method does not trigger the item selection signal.
</description>
</method>
<method name="set_item_auto_translate_mode">
<return type="void" />
<param index="0" name="idx" type="int" />
<param index="1" name="mode" type="int" enum="Node.AutoTranslateMode" />
<description>
Sets the auto translate mode of the item associated with the specified index.
Items use [constant Node.AUTO_TRANSLATE_MODE_INHERIT] by default, which uses the same auto translate mode as the [ItemList] itself.
</description>
</method>
<method name="set_item_custom_bg_color">
<return type="void" />
<param index="0" name="idx" type="int" />