I have two widgets on the viewport. One is a collection of buttons and the other one is a SScrollBox containing buttons.
I’ve implemented drag&drop on the collection of buttons. It works, the events are fired correctly OnDragEnter, OnDragLeave, OnDrop, …
Now, I’ve implemented the drag&drop on the button’s widget contained within the scrollbox.
The OnDragEnter, OnDragLeave is fired within the widget. But when I move the dragged item to the other buttons’ widget, the event OnDragEnter, OnDragLeave and OnDrop is never fired.
Is there something to do to enable events to be fired on other widget ?
The problem I see with this is that the widget added to the viewport is taking the full viewport size. I’ve checked that in the Widget Reflector.
Then he is covering other widgets added to the viewport.
How can I add a widget to the viewport taking only his real size and not the full viewport size ?
In the UMG editor you have the option “Desired on Sceen”. Then, how to sets this proprety in a SlateWidget ?
If you need one widget to get all attention in the sense of events then you simply should use CaptureMouse - this is common trick almost in all systems for that purpose. The main idea - widget that calls Capture Mouse get all mouse events until calling Release mouse from capture independently of Z orders and other overlapped widgets.
Your second question - when you add Widget you get Slot as the result. By editing some props of this Slot you can change widget screen position and size