+3 votes

I mean honesty..
http://docs.godotengine.org/en/latest/classes/class_itemlist.html#class-itemlist

There is nothing about this in the documentation and no function or method to get that index! There are no tutorials anywhere about it either. Such a simple thing, why is it so hidden in godot?

Please help

in Engine by (100 points)

2 Answers

+1 vote

ah nevermind. I figured it out. You have to connect the itemList to the node with the script.
Then you get this function

func onItemListitemselected( index ):
print (index)

by (100 points)
–7 votes

Oh my God... in the "ItemList" not built-in method returns the index of the selected item?!!... This is a cruel joke?

by (359 points)

I get it is weird. But this is not an answer, you should add it as a comment.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to [email protected] with your username.