ID:168445
 
MouseDrop proc (atom)

over_location:
the turf or stat panel containing the object under the mouse pointer

but I wanted to drop it onto a obj and I cant set a turf to an overlay. and I dont use statpanels

so how do I add a working mouse drop if byond does not support droping onto a obj thats in the clients screen
Zmadpeter wrote:
MouseDrop proc (atom)

over_location:
the turf or stat panel containing the object under the mouse pointer

but I wanted to drop it onto a obj and I cant set a turf to an overlay. and I dont use statpanels

so how do I add a working mouse drop if byond does not support droping onto a obj thats in the clients screen

I just ran a demo test code for the above. To see if byond does support dropping onto an object. Yes it appears so. The code is bellow.
obj/onscreenobj
screen_loc="3,NORTH"
icon = 'onscreen.dmi'

mob/Login()
var/client/C = src.client // Typecast client
C.screen += new/obj/onscreenobj() // Add to screen
src.Move(locate(1,1,1))
return ..()

obj/todrag
icon = 'Dragon.dmi'
MouseDrop(over_object,src_location,over_location)
world << "over_object:[over_object]"
world << "src_location:[src_location]"
world << "over_location:[over_location]"
return .. ()

When runned and I drag my object over the screen object. It outputs the fallowing.

over_object:the onscreenobj
src_location:the turf
over_location:

Does that help? Cause your message for me is a little hard to fallow.
In response to Green Lime
nope that dont help

im Draging a OBJ "A" onto a OBJ "B" but "B" is in the clients screen

the code
    MouseDrop(var/obj/dropedonto,var/src_location,var/over_location)
world << "droped onto [dropedonto] ^ from - [src_location] ^ to - [over_location] ^ usr - [usr] ^ src - [src]"


says

droped onto ^
from - the grass ^
to - ^
usr - Zmadpeter ^
src - item1

so its not picking up what its droped onto!

that leads me back to my first Q

so how do I add a working mouse drop if byond does not support droping onto a obj thats in the clients screen.
In response to Zmadpeter
so how do I add a working mouse drop if byond does not support droping onto a obj thats in the clients screen.

It does, I've done it before. If I can find it, I'll post some of it here.
In response to Zmadpeter
so its not picking up what its droped onto!

that leads me back to my first Q

so how do I add a working mouse drop if byond does not support droping onto a obj thats in the clients screen.

Try setting the mouse_opacity var of the object to drop onto to 2. This will make it so you don't have to drop precisely onto the solid portion of the target object's icon, which could be your problem.

That's just a guess in the absence of more information, however.

I can say quite definiteively that BYOND does in fact support drag-and-drop to the client screen, since I have it working in one of my little pet projects, Realms (used as a user-interface-design experiment).
In response to Jtgibson
I actually did a demo on that client screen thingy... incredibly simple but I cant get it to UPLOAD!...
In response to Lou
nope still dont work

draging a obj "cherry" from the grass (a turf) onto the screen
that has a obj "backpack" on it

droped onto ^
from - the grass ^
to - ^
usr - Zmadpeter ^
src - the cherry

does the layer of the obj droped onto in anyway have to be higher then the item being droped?

I checked your demo but it does not cover droping onto a obj its only covers moving one around.
In response to DarkCampainger
bump still need help with this