I want to make a Macro System where I'll drag an icon from a window to other window, but my MouseDrop isn't working very well ( I don't know how to use it with window ), if someone wants to help me.....
Thanks a lot
PS: I'm using grid inside window....
ID:273754
Mar 8 2011, 4:03 pm
|
|
In response to Bravo1
|
|
I already read that help... but I did'nt understand very well....
I don't know what "location" I have to use... I tried ' over_object ' and ' over_location ', but it didn't work. |
In response to Feferson Uchiha
|
|
if it gives you errors then try overriding the MouseDrop proc with exactly the same arguments as in the byond help.
over_object is the object that you're hovering the dragged object over, when you drop src (the object you were dragging) then you will want over_object to be modified based on what src is. |
In response to Bravo1
|
|
This is the problem, it doesn't give me errors, it just doesn't work o.o'
And I tried to override too, but it diddn't work again.... I guess I'm using the wrong method o.o |
In response to Feferson Uchiha
|
|
Could you post the code you're using?
|
In response to Bravo1
|
|
OK
MouseDrop(over_object) if(istype(over_object,/obj/macros)) var/obj/macros/s s=over_object s.overlays = null s.overlays += /obj/gui/jutsus/Tatsumaki I was using this one for Macros on user screen... Then I tried many ways to make it in window, this is one of my attempts: MouseDrop(over_object) if(istype(over_object,/obj/macros)) var/obj/macros/s s=over_object s.overlays = null s.overlays += /obj/gui/jutsus/Tatsumaki winset(src, "macros.grid", "current-cell=[1]") src << output(s, "macros.grid") winset(src, "macros.grid", "cells=[1]") I was just doing some tests, then I used just 1 cell.... Sorry if I'm doing something wrong, I'm beginner here =) |
In response to Feferson Uchiha
|
|
this would probably work a lot better with screen object, it's what I use and the system hasn't given my any problems and is very similar in design to yours. I'm going to test the code out myself with grids in the meantime, I'll let you know the results
|
In response to Bravo1
|
|
OK, Thanks
I want this system in window because I have a lot of ideas and I have more control over it.... |
Other than that though, I'm not sure if grids can have items dragged in and out of them, I'll test it myself today. (it may just need a placeholder object in the cell to recognize it)