Hi,
I’ve got a relatively easy task at mind - drag an icon from one container to another.
To get into more details - I’ve got two DirectFrame objects (one represents a chest of loot the other a players inventory) they are both parented to base.a2dLeftCenter(could be aspect2d, not that important, they just have the same parent), one of them has a button parented to it(it’s just an icon, it could well be just a DirectFrame as well). Now I’d want to use the mouse pointer to move that button/icon from one of the frames to the other, so that when it’s done the icon will be parented to the frame it was dragged to.
So I have a task watching the mouse pointer and translating its position into the aspect2d(or a2dLeftCenter) coordinates also an event for when the button/icon gets clicked on (to start/stop moving that icon to where the mouse pointer is). That I can do (but I can’t get the icon to stay on top of both frames).
How should I determine what’s under the icon that’s moving with the mouse pointer? DGG.ENTER and DGG.EXIT events for the frames do not detect the pointer when my icon is on top of the frame (and I want it to be on top).
Any ideas, tricks, tips?