Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: magicpotato on November 11, 2013, 12:35:42 AM

Title: [request] static UIToggle.GetActivatedToggle(group)
Post by: magicpotato on November 11, 2013, 12:35:42 AM
Hello 8) I want to put following code into UIToggle.cs

Also I want to change the type of group to string for development efficiency.
The compare cost this case is not big issue on today.

    static public UIToggle GetActivatedToggle(int group)
    {
        foreach(UIToggle toggle in list)
            if (toggle.group == group && toggle.value)
                return toggle;
        return null;
    }
Title: Re: [request] static UIToggle.GetActivatedToggle(group)
Post by: ArenMook on November 11, 2013, 12:27:44 PM
Sounds useful to me. I've added
  1. static public UIToggle GetActiveToggle (int group)
to UIToggle on my end, so you will see it in the next update.