Author Topic: Button Hover when switching via script  (Read 2979 times)

Memige

  • Newbie
  • *
  • Thank You
  • -Given: 2
  • -Receive: 0
  • Posts: 8
    • View Profile
Button Hover when switching via script
« on: March 16, 2014, 01:55:31 PM »
I'm dealing with a minor glitch where the buttons do not display in their hovered state when switching to them using UICamera.SelectedObject = myButton.  It doesn't seem too complicated and I'm fairly confident I can track down the issue, but any help would be appreciated; got any thoughts on obvious gotchas?  According to my debug logs, the buttons are in fact selected, they just don't appear that way.  I can move off of them without a problem, moving back onto them causes the correct Hover image to appear, and clicking fires the correct messages; but changing the selection via script through UICamera.selectedObject seems to be leaving it (visually only) in the 'normal' state.  Maybe I'm missing a notification or something?

Thanks for your help,
Memige Den Adel
LOOT Entertainment

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Button Hover when switching via script
« Reply #1 on: March 17, 2014, 01:22:36 AM »
UIButton won't assume a highlighted state on selection unless the UICamera is currently set to be using Controller type input. Look closer at UIButtonColor's OnSelect function.

Memige

  • Newbie
  • *
  • Thank You
  • -Given: 2
  • -Receive: 0
  • Posts: 8
    • View Profile
Re: Button Hover when switching via script
« Reply #2 on: March 17, 2014, 10:22:00 AM »
Fantastic, just what I was looking for, I've got it working perfectly now.

We used a competitive product for 2 years before switching to NGUI, and have never looked back.  Much better product, much better support.  Many thanks and keep up the awesome work.

-Memige