Author Topic: UIButton Question  (Read 2414 times)

jaised

  • Guest
UIButton Question
« on: July 20, 2012, 10:19:05 AM »
I am working on getting panels to fade in and out and I used your suggestions at http://www.tasharen.com/?topic=about-tweencolor-alpha-only. However, I encountered a problem where I was getting an array of UIWidget, but UIButton or any classes related to Button ie ImageButton aren't UIWidgets... Is there a reason for this? I don't want to have to make a bunch of separate cases searching for different types of objects (as that gets horribly messy), what do you recommend, how would you solve this? Your suggestion above works great with everything else, just the buttons aren't fading leading to an ugly transition. Thank you for your time.

Xanatus

  • Guest
Re: UIButton Question
« Reply #1 on: July 20, 2012, 11:27:31 AM »
UIButtons uses sprites and labels which are UIWidgets, so it should work with them. A UIButton itself whould just be a container for those so the container itself whouldn't have alpha.
« Last Edit: July 20, 2012, 11:29:21 AM by Xanatus »

jaised

  • Guest
Re: UIButton Question
« Reply #2 on: July 20, 2012, 01:13:30 PM »
Yeah that is really weird then, because I am using
  1. panel.GetComponentsInChildren<UIWidget>(true);
and everything fades, but the buttons and the button part of sliders.

jaised

  • Guest
Re: UIButton Question
« Reply #3 on: July 20, 2012, 01:34:31 PM »
Well, it must've been a Unity Glitch or something, because I closed it, went to lunch, came back, and now it works. Hooray Unity! =P