PDA

View Full Version : drag/drop with NR >= 1.1.0.41 (WIN32 only)



mhwlng
August 4th, 2005, 09:43 AM
see picture

never mind the fantastic graphics...

you can drag the frame 'X' between two targets 'T1' and 'T2'

if you let go of the mouse, the movement is animated exactly like the cards in the solitaire card game that comes with windows....

(I see a lot of potential for games here...)

so if the mouse is let go and the 'X' frame touches any part of target 'T1' or 'T2' then it is moved to that target, otherwise it is moved back to the original target. all animated...

the drag/drop uses a new function in the marcelutils plugin to get the mouse position.

http://www.promixis.com/phpBB2/viewtopic.php?t=8605&highlight=

(the sample is also included with the plugin : dragdrop.ccf)

native support for this in a future NR would be easier and could probably support PPC (now it's WIN32 only)


dragging a button doesn't work, only frames... Don't know why yet...

and the example (that comes with above mentioned plugin) uses the new

NetRemote.SetElementPosition
NetRemote.GetElementPosition
NetRemote.GetElementSize
NetRemote.SetTimer
etc.

in NR >= 1.1.0.41


Marcel

Ben S
August 6th, 2005, 09:29 AM
Ben, a netremote.GetElementSize would be very useful (or have I missed that function :D )

Nope, it's not there yet, but it's in the works.

Nifty stuff, as usual, Marcel.

mhwlng
August 9th, 2005, 04:25 AM
dragdrop sample lua code is improved and also now uses NetRemote.GetElementSize introduced in NR 1.1.0.41

It comes with the marcelutils plugin

http://www.promixis.com/phpBB2/viewtopic.php?t=8605&highlight=

Marcel