ID:158216
 
Trying to Make a Button where i can drag a item onto a custom skin window and mouse up on it to execute a command? is this possible?

there is no option for this on the button, but thought i would ask in case im missing something...
You can drag atoms from any control that can display them to any other control, as far as I remember. Should be the same for all other forms of mouse control.

However, when dragging the target control needs to have its drop-zone parameter set to "true" for dropping objects on it to be allowed (last time I checked there it actually appeared that this parameter is ignored, which would've been a bug). You can set this parameter from the Interface Editor itself by going to the control's Properties.
In response to Kaioken
so if i set a button to be a drop zone, how do i get it to run a command when a mouse up is done to the button?

if i set a grid with drop zone, there is no place to set a command?

if a button the command line only works when pressed...

I must be missing something simple thx
In response to AmandaDD
AmandaDD wrote:
so if i set a button to be a drop zone, how do i get it to run a command when a mouse up is done to the button?

You can't as of yet, that's something different. As I highlighted in my previous post, BYOND's proc-based mouse control system (Click(), MouseUp() and everything else in that family) works in conjunction with atoms only. So you can't do things like pass a click on a button (or a label) to the Click() proc, same thing for MouseUp() etc. The procedures are atom-based and so they are only called when the action is done to an actual atom object. So you can do an action when a player drags an atom displayed in a grid to a button if you want, but since buttons can't display atoms there's no way to pull off actions after dragging a button somewhere (because as mentioned, you can't drag controls themselves, like buttons).

(Obviously for some things interface-based alternatives are available already, like clicking buttons)
In response to Kaioken
ok, i think i understand this is as far as i got, but the window is not selected when i drag something from the default window to it.. reading the skin ref seemed like this would work lol

<code>client MouseUp(window1.button3, usr.Droppedit()) mob/proc Droppedit() world<<"HI" </code>
In response to AmandaDD
'The crap is up with that code? You're trying to call a procedure where argument declarations go. Your first argument is also invalid and it shows you don't know what you're doing. It's a bug that Dream Maker even compiles those arguments.

This is how you'd do it properly:
client/MouseUp(a,b,c) //name isn't important as long as it's VALID
src.mob.Droppedit()


Seriously, you need to learn the language before you continue.