jit.lcd: mouse dragging instead of mouse drawing?

flim's icon

hi @ll!

I've found following patch in this forum...

it let's you drag a [jit.qt.movie] clip around in a [jit.window] object, the movie clip always following the movement of your mouse.

I've created a single square grid (feeding [jit.lcd] with a framerect message & setting it on top of the [jit.qt.movie] object) - for I'd like to be able to drag around my framerect shape just as it's done with the [jit.qt.movie] clip in the example (both pasted in the following patch)..

so instead of mouse drawing in jit.lcd I'd like to drag already defined shapes around (sorry for the repetition, grin)..

thankful for any hints!

have a nice weekend..!

-jonas

Max Patch
Copy patch and select New From Clipboard in Max.

Rob Ramirez's icon
Max Patch
Copy patch and select New From Clipboard in Max.

same basic concept, except there's no need to convert screen coordinates to gl world coordinates.
simply subtract and add half the width and height of the box to the mouse coordinates from the pwindow: