Author Topic: Button disappears after hover  (Read 5914 times)

luisdiv

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 32
    • View Profile
Button disappears after hover
« on: November 27, 2012, 12:50:37 PM »
Hello again,

I've animated some buttons to enter screen by fading in with a TweenColor component. They come in without any problem. If I hover over them, a TweenColor component is automatically added to the child Background for the event. The problem is that if after hovering over the button it fades out to 0 alpha.

If I deactivate the TweenColor component from the parent button solves the problem, but destroying the component after the animation doesn't. Still, I'd like to keep the animation. What would be the supposed solution? Or maybe I'm doing something wrong..?

Thanks!

PD. I'm still using the free version
« Last Edit: November 27, 2012, 01:08:22 PM by luisdiv »

JRoch

  • Full Member
  • ***
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 140
    • View Profile
Re: Button disappears after hover
« Reply #1 on: November 27, 2012, 02:43:47 PM »
So do some event handling of your own and write the correct alpha value to the control?

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Button disappears after hover
« Reply #2 on: November 28, 2012, 01:57:55 AM »
I generally don't recommend tweening alpha / color of anything individually in order to fade them in. Either use UIPanelAlpha, or consider a different way of fading them in -- such as via an animation that scales or moves them in.

luisdiv

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 0
  • Posts: 32
    • View Profile
Re: Button disappears after hover
« Reply #3 on: November 28, 2012, 10:29:00 AM »
Thanks again!