Author Topic: Weird behavior in UIButtonOffset helper [3.7.9]  (Read 4215 times)

armitage1982

  • Newbie
  • *
  • Thank You
  • -Given: 7
  • -Receive: 1
  • Posts: 15
    • View Profile
Weird behavior in UIButtonOffset helper [3.7.9]
« on: January 21, 2015, 06:54:25 PM »
I think UIButtonOffset caches positions for the tween and doesn't take in account the Anchor parameters of the Target.

To reproduce that issue open the Chat Example :
  • Add a sprite with an anchor position set at the top right corner of the Chat window.
  • Add a UIButtonOffset to that button
  • Resize that window in-Game thanks to the UIDragResize
  • Now just rollover the close button : it will translate to a random position.

Maybe those helper weren't intended to work with the new Anchor system.
It's easy to come with a solution but I wanted to report that weird behavior just in case ;)

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Weird behavior in UIButtonOffset helper [3.7.9]
« Reply #1 on: January 22, 2015, 11:59:03 AM »
No, it certainly doesn't. Why would it? UIButtonOffset moves the transform. So does anchoring. The two quite obviously conflict.

If you want to use UIButtonOffset, put it on a child object, not on the anchored one.