Tasharen Entertainment Forum

Support => NGUI 3 Support => Topic started by: halsafar on May 21, 2014, 01:57:11 PM

Title: Keep UIButton highlighted
Post by: halsafar on May 21, 2014, 01:57:11 PM
I have a set of buttons which represent tools, only one of which can be selected at a time.

I would like be able to keep the selected button highlighted and remove highlighting from the others.  For highlighting I was hoping to use a color but a second texture works too.

I tried UIToggle with a unique group and my UIButtons just disappeared and reappeared as I moused over them.

I can do what I want manually in code but I figured NGUI would support this.
Title: Re: Keep UIButton highlighted
Post by: halsafar on May 21, 2014, 02:42:20 PM
Figured it out.

Widget+UIButton+UIToggle
- ButtonSprite
- SelectedSprite

Set the UIToggle sprite to SelectedSprite.

Make sure to use a unique toggle group.