Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: Vuoripeikko on July 10, 2014, 07:28:56 AM

Title: UIPopuplist current selection presented as a digit?
Post by: Vuoripeikko on July 10, 2014, 07:28:56 AM
Heyup, first of all, NGUI is an awesome asset and I've been using it for a project for some time now. I do have a problem now that I thought of asking here - is there a way of getting the number of your current choice from UIPopuplist? I know you can get the value as a string, but as an int?  ???
Title: Re: UIPopuplist current selection presented as a digit?
Post by: ArenMook on July 10, 2014, 09:11:57 PM
Popup list always has a list of strings that it's working with. Assuming you need an index, UIPopupList.items.IndexOf("some value") will tell you the index.
Title: Re: UIPopuplist current selection presented as a digit?
Post by: Vuoripeikko on July 14, 2014, 01:38:35 AM
Thank you, it works like a charm.  ;D