PDA

View Full Version : drag/drop initiative possibility.



Ken L
March 14th, 2018, 23:28
I've been thinking about implementing some kind of drag/dropping of window elements within the combat tracker. IE: drag drop CT entries within the list to re-order them.

However, I don't believe that seek location is an available piece of information you can get from a window within a window list. You can pick out the drop location coordinates after a drag/drop in terms of absolute position within application window, and thus the CT window.; but this is useless information without knowing the current seek location.

So I take it this is impossible?

Bidmaron
March 15th, 2018, 00:34
What do you mean be seek location?

If you are talking about the start location of the drag, you have to get that indirectly. What I did in my dragline control was preserve the mouse down location and then when dragstart occurs (which only fires after the drag has gone some distance) I would go fetch the original mouse location I stashed

celestian
March 15th, 2018, 01:09
Sounds like he wants to get the drop destination, not start location.

I've not actually needed a drop location in anything I've coded but that would be nice to be able to drag a creature to a different position in the CT list.

pindercarl
March 15th, 2018, 03:25
The entries in the Combat Tracker are in a list control. You might be able to use getWindowAt to determine the entry that is under the mouse pointer. Maybe. I don't interact much with the LUA side of things.

Ken L
March 16th, 2018, 23:27
getWindow from window list can work after you adjust the current absolute mouse position relative to the window.