Tasharen Entertainment Forum
Support => NGUI 3 Support => Topic started by: cplusplus on August 04, 2014, 03:41:45 AM
-
Hi,
I have a problem with a button.
My button contains a label. When I press the button, the image looks "pushed" down, so that the optical bounds move 4px down, but of course the real bounds do not change.
I tried to move the label 4px down via Tween on -> press-true and reverse via press-false.
But that works not as intended, it moves down the first time, and then it's moves unpredictable, but I don't know why.
Baking the text or images into the Button is no option, as I have too many.
Any help?
-
Just make the label a child of the sprite you're moving, then any changes to the sprite's position will automatically affect the label. Or are you not actually moving the sprite, and simply changing it to another one that looks pressed down? If so, use UIButtonOffset component. Choose the target to be the label and the Duration to be 0 so that it's instant.
-
UIButtonOffset was the solution. THX