Download

[HELP]Drag'n drop

So I have been messing around with EPIC’s drag and drop operation but I have not found a way to drop a widget on top of another widget and then start another drag drop operation picking up the other widget you placed the new one on top of.

Reason is I have a jigsaw inventory and I want to be able to place the item on another item and pick up the item that you are placing the current item over.
I have looked every where I can but no way to actually start another drag drop operation any other way then bind mouse down and drag detected being the only place to put this awesome node!
I have reason to believe that this node is not going to do what I need it to do and will need to manually create a drag and drop operation in blueprint, was refraining on this method but can do if it’s not possible with EPICs method.

I have tried putting it a drag and drop operation in the on drop call on a widget which will create the operation tested by debugging but will not actually follow through.
I can post examples of what I am talking about and really is not that hard to set up to replicate but I can not figure a way to go about doing this and am ready to start my own method.

Hoping some more experienced eyes will catch this.

Bump still woundering if other people know a work around?

Is this roughly what you’re after?

1bd187c5a83ad753c884022800ec090e81ac657f.gif

The widgets are nesting in one another and are draggable. Every widget has both drag and drop operation, and a container that can hold any other widget.

edit: just noticed it works pretty well the other way round, too.

7c10f9d6d80c13f0eba46fab193560d2d4c16e59.gif

Nah sorry it took so long to reply was busy the other day but this is what I was trying to accomplish with epics drag and drop operation
giphy.gif

Right now it uses the drag and drop operation but have been working on another way of accomplishing this and can kind of see what i would need to do with the drag and drop but I’m just assuming you wont be able to do it with epics method.

I actually accomplish what I was aiming for so far
giphy.gif

I guess epics drag and drop operation is just the basic and only good if you are doing simple drag and drop operations.

I guess you run into an issue with overridden functions not being blueprint callable.
Looks good, how did you accomplish it then?

Math lol. Basically created a drag and drop widget that on created takes in the item and then when its in it will do things on created destroyed and on tick. So I use the tick event and act like that is my ondrag event because technically is because the moment I create the widget it starts the drag drop meaning on tick is what I want it to do while dragging set a few bools and I was good.

I can actually place the widget any where in the inventory now and it also depends on what slot of the item I clicked on so say that belt takes a 2x1 spot if I click on the 1x1 part of it and place it it will place it based on that slot area and so forth if I select the 2x1 part of it it will set the item down ending and that spot aswell, and picks the item up by the slot you set the other item on top of too making it really awesome and smooth.

Sounds good, I get the idea. I was wondering how you invoke onDragDetected. Thanks for taking the time to explain.
I’ll have a look at SWidget::OnDragDetected to see if Slate can call it directly in a drop operation and simultaneously create another drag operation.

What I used was on constructed is the start of the drag, on tick was dragdetected, and on deconstruct is on drop or what ever you really want to do when you finish the drag operation you have to define if its canceled or dropping and the custom drag widget carries the items details where I can access them because its stored in my main interface because I want to drag it all over the screen not just limited to the inventory.