DirectGuiWidget: Click and drag

I’m trying to click and drag window elements (direct frames) around the screen, but I’m having some difficulty. I noticed there’s an undocumented guiDragTask, with a ‘state’ variable that I’m not sure what to put in.

Has anyone had any luck with guiDragTask or am I going about this completely the wrong way. If there’s an easier way, please let me know.

I don’t know about guidragtask, but here is a link that may be useful.

Actually, that was extremely useful. That’s more or less what I’ve done, I just needed the .bind() method (which is hidden very well).