Can somebody write the most short code for drag'n'drope? Like in Windows.
One object in empty room. Free move of the object in this room.
The most short code for grag'n'drope?
Re: The most short code for grag'n'drope?
there is an example on the Homepage that you can download, its called "Slidebar Demo". It also contains some simple dragndrop objects
Re: The most short code for grag'n'drope?
Yes. Good. But it was so hard to understand for me...i fucked my brain, but did it by myself.Zimond wrote:there is an example on the Homepage that you can download, its called "Slidebar Demo". It also contains some simple dragndrop objects
In room
On (loop1)
{
if_bool (step; false)
{
setnum (obx; 0)
setnum (oby; 0)
}
if_num (pos; 1)
moveobj (Object2; [mousex]-[intervalx]; [mousey]-[intervaly];0)
setbool (step; true)
}
in object
on (click)
{
setnum (intervalx; [mousex]-[obx])
setnum (intervaly; [mousey]-[oby])
setnum (pos; 1)
}
on (release)
{
setnum (pos;0)
setnum (obx; [mousex]-[intervalx])
setnum (oby; [mousey]-[intervaly])
}
You work under new version ot the (great) editor?