Author Topic: Possible (minor) bug with UICenterOnChild  (Read 2973 times)

MrTact

  • Newbie
  • *
  • Thank You
  • -Given: 0
  • -Receive: 2
  • Posts: 32
    • View Profile
Possible (minor) bug with UICenterOnChild
« on: May 21, 2013, 10:57:08 AM »
This is version 2.5.1. Line 53, it reads

mDrag.onDragFinished = OnDragFinished;

Should that perhaps be

mDrag.onDragFinished += OnDragFinished;

so it doesn't stomp any event handler the user might have attached directly to the draggable panel?

Might need to check first and make sure the delegate doesn't already contain the functionality to avoid multiple calls. I'm not really clear on what happens there if you try to add the same function to a delegate, and I couldn't find a definitive answer.

ArenMook

  • Administrator
  • Hero Member
  • *****
  • Thank You
  • -Given: 337
  • -Receive: 1171
  • Posts: 22,128
  • Toronto, Canada
    • View Profile
Re: Possible (minor) bug with UICenterOnChild
« Reply #1 on: May 21, 2013, 12:48:30 PM »
The way it is is intentional. Also keep in mind that your NGUI is out of date, and support is generally only provided for the latest version.