Author Topic: Active button hover state  (Read 2477 times)

newnixon

  • Guest
Active button hover state
« on: May 02, 2012, 12:21:14 PM »
I have 8 buttons on a panel. I would like it if when you click on the button that it would stay in the hover state until another button is selected. So that the user will know which button is active. I think you can do this with groups for check boxes but I am not sure how to do it with buttons. Can anyone tell me how?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Active button hover state
« Reply #1 on: May 02, 2012, 12:27:31 PM »
Set up your buttons, then get rid of the UIButton or UIButtonColor script on them, and add a UICheckbox instead. Duplicate the button's background (bring its depth forward), bring the label forward more, and change the duplicate background's color to whatever you want it to be when it's highlighted. Now on the checkbox script, specify the checkmark to be this duplicate background you created. Last but not least, set the radioButtonRoot on UICheckbox to be the parent object that all your buttons are parented to.

newnixon

  • Guest
Re: Active button hover state
« Reply #2 on: May 02, 2012, 01:13:23 PM »
Thanks!! I will try it.