x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Drag and drop widgets

Hi Mates!

I've created a HUD with ScrollBoxes in which there are dragable widgets.

When the drag is detected the widget is removed from parent and when drop is detected it appears on the mouse position.

The problem is when I drag another widget and drop it on the widget draged before. The currently draging disappears. It's because the "On Drop" operation is implemented in my HUD widget whereas my previously draged widget in not a HUD. It's recognized as drop on the dragged widget.

Is there any way to avoid this problem?

Thanks

Product Version: UE 4.20
Tags:
more ▼

asked Sep 04 '18 at 09:02 AM in Blueprint Scripting

avatar image

ionizator
6 2 6

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

1 answer: sort voted first

If you have more than 1 dragging widget i would suggest different "drag and drop operation" blueprints for each of them. Just right click in the content browser - new blueprint class - unhide all classes und search for "drag and drop operation". Create a custom one with your variables. In your case you´d need 2 different drag and drop operations here.

In the on drop function on your receiving widget do a cast to your first created drag and drop operation. If this is true handle your regular on drop code. if the cast fails, do another cast for your second created operation and set up the new on drop code here.

You just need to create them correctly on your "on drag detected" function. Hope that helps

more ▼

answered Sep 21 '18 at 10:14 PM

avatar image

Gim117
6 1 4 6

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question