ESOUI - View Single Post - Moving a control with
View Single Post
02/02/19, 01:03 AM   #4
AddOn Author - Click to view addons
Join Date: Apr 2016
Posts: 238
Originally Posted by Dolgubon View Post
One option would be to set the anchor of the parent to be relative to the green square. For example,parent:SetAnchor(TOPLEFT, greenSquare, TOPLEFT, 0,0)

Another option (if that doesn't work) would be to use the OnMoveStart and OnMoveStop of the green square, and put something like:
EVENT_MANAGER:RegisterForUpdate("moving", 10, moveParentToGreenSquare)
AH of course! The green square needs to be the parent, not the icon. I use the register function to update the coordinates in realtime when draging the control around.

Thanks for your help, guys!
  Reply With Quote