Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / Drag and drop on Sprite

Author
Message
Changer
15
Years of Service
User Offline
Joined: 26th Mar 2009
Location:
Posted: 26th Mar 2009 19:33
I just started on my first Dark GDK project, which is a Checkers game. I therefor need a Drag'n'Drop function to move my pieces arround.

I can make the piece follow the mouse when prssing and holding the mouse button, using dbMouseClick. But that's also all I can make it do..

Does anyone have an idea to how I can make a Drag and drop function?
WH8
15
Years of Service
User Offline
Joined: 17th Mar 2009
Location:
Posted: 31st Mar 2009 03:30 Edited at: 31st Mar 2009 03:34
What I would do is that I would make it so that when you let go of the mouse, the sprite that is following the mouse is deleted and a new identical sprite is made at the location where you let go of the mouse button.



The above is just a hint. Note that you are supposed to input your own code into wherever I put "...".

Login to post a reply

Server time is: 2024-09-30 21:20:37
Your offset time is: 2024-09-30 21:20:37