//Title: ReceiveDrop
//Credit to: Jtgibson
//Contributed by: Jtgibson
/*
A custom procedure I really like to use is a simple tweak: a ReceiveDrop()
procedure.
Instead of having the dragged object specify what happens when it is dropped on
top of a target, the target specifies what happens when the dragged object is
dropped on top of it. This semantic makes more sense to me (especially if a
there are a lot of draggable objects but only a few possible destinations),
although the default behaviour works just fine too.
The proc also remembers the user who attempted the action.
*/
atom/MouseDrop(atom/over_object, src_location, over_location,
src_control, over_control, params)
if(over_object)
over_object.ReceiveDrop(src, src_location, over_location, \
src_control, over_control, params, usr)
. = ..(over_object, src_location, over_location, \
src_control, over_control, params)
atom/proc/ReceiveDrop(atom/object, object_location, self_location,
object_control, self_control, params, mob/originator=usr)
ID:195057
![]() Feb 13 2008, 4:35 pm
|
|