Author Topic: UIButton bug with disabled color  (Read 2139 times)

ryan

  • Jr. Member
  • **
  • Thank You
  • -Given: 0
  • -Receive: 1
  • Posts: 90
    • View Profile
UIButton bug with disabled color
« on: August 15, 2012, 02:39:46 PM »
If a UIButton's tweenTarget is not set, setting isEnabled on the button doesn't change the button's color unless I've already moused over or pressed the button.  Looks like the problem is in UIButton's UpdateColor method:

  1.         if (tweenTarget)
  2.         {
  3.                 if (!mInitDone) Init();
  4.                 // stuff...
  5.         }
  6.  

This version works better:

  1.         if (!mInitDone) Init();
  2.         if (tweenTarget)
  3.         {
  4.                 // stuff...
  5.         }
  6.  

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: UIButton bug with disabled color
« Reply #1 on: August 15, 2012, 08:53:48 PM »
I'll change it on my end, thanks.