What is the purpose of the set_item_text function in ItemList?

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By patatra

Hye everyone,
Could you tell me what the set_item_text function of ItemList is for? I can’t understand what this text is for.

Good Day,

:bust_in_silhouette: Reply From: Gangster53 YT

Hello. For an “ItemList” the “set_item_text” code replaces an “Item” on an “ItemList”. Sample:

func sample():
	$ItemList.set_item_text(1, "example")

You will write the “Item” index in the top 1 place. So 1 there replaces the text of the 1st item with the string value on the side.
I hope I could help.

My Godot version: 3.4.4 stable

–Have a nice day–

Thank you and good day

patatra | 2022-10-10 18:04