Author Topic: make the button keep highlight  (Read 2986 times)

mapleegreen

  • Guest
make the button keep highlight
« on: October 06, 2012, 06:50:08 AM »
I have a grid which has some buttons as item.When a button is selected,how to make it highlight just like the effect when the mouse hover?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: make the button keep highlight
« Reply #1 on: October 06, 2012, 09:30:54 AM »
Selected how, exactly? Unless you manually select it via code, the only way to select it would be to click on it. And if you select it via code, it should already get highlighted.

mapleegreen

  • Guest
Re: make the button keep highlight
« Reply #2 on: October 06, 2012, 08:45:02 PM »
if on pc platform,when mouse move on the button ,the button will be highlight.But on ios platform,if the touch end,the highlight will lost.I want to when a button is touched or selected(I use the function void OnSelect (bool selected) in script) it will keep the highlight until another button is selected

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: make the button keep highlight
« Reply #3 on: October 07, 2012, 12:36:36 AM »
It sounds like what you're looking for is a radio button -- once toggled, stays toggled until you toggle something else. You can make them by using the Checkbox component. I remember answering how to do it in detail just a few days ago here.