ID:141078
 
Code:
obj
Fireball
icon='Attacks.dmi'
icon_state="Fireball"
MouseDrop(over_object,src_location,over_location,src_control,over_control)
if(over_location=="UIBars")
if(over_control=="one")
winset(usr,"macro.1","command=[src.name]")
winset(usr,"UIBars.one","image='[src.name].dmi'")


Problem description: The idea is that the Fireball object is in a list of spells, displayed in a statpanel. I'm trying to make it so that when you drag it to a certain label within a certain window, or pane, that is displayed within a child of the main interface, the windows change to what I want them to do, using winset. The problem isn't winset, because I know the above commands will work in a Click() proc, but I don't know how, or if it's possible to use MouseDrop to change a window in a custom interface.

Is this possible?

If so, how?

If not, can you recommend a different way(in theory, not in code) that I could make this work? My original intention was to give each object verbs that would set the windows manually, by rightclicking the object, and picking the verb, named to switch whichever window was named. Unfortunately though, the only commands recognized in a list of objects that aren't in usr.contents are Mouse commands.

Thanks again.

Use a grid instead of a label.
In response to Kaiochao
will the above code work for a grid?
In response to Lightja
Grids, unlike labels(I think) like the mouse procs.

I actually haven't looked at your code much.
In response to Kaiochao
AFAIK the mouse procs work for every control where appropriate: you can MouseDrop objects on every control, including labels.
Note that all controls have a drop-zone parameter which is supposed to control whether objects can be dropped on the control or not - from the Skin Reference:
True if dragged objects may be dropped here. Default is true for Map, Info, and Grid controls, false for others.

However, it seems not to work - I haven't done extensive testing, but I could successfully drop an obj on a label without doing anything special.