UMG Drag and Drop

I’m trying to follow the tutorial snippet on post 5 of this thread:

However, when I get to step 2 ‘On Drag Detected’ is not listed under the events for the widget.

How to I implement it?

It’s a function you have to override, it won’t be displayed as part of the events, which only appear in the event graph and never return a value. You’ll find it under the Override drop down under the functions list in the “My Blueprint” tab.

Thanks you!

I have another question:

I use an Action Mapping that I handle in C++ through “SetupPlayerInputComponent” to show the inventory widget. I then set the input mode to “FInputModeUIOnly” so that I can properly interact with the widget. However, I can’t close the widget now because “FInputModeUIOnly” prevents my player ACharacter from receiving the input.

How can I close the inventory widget through C++?
Or, what is the best way to do it using blueprints?

I have the same problem. I use the Game AND UI input mode and just limit the character movement while my inventory is open.

You can override the OnPreviewKeyDown function on your base widget and check to see what key it is (Equals Key) and if it’s the key you want to close the widget you can call that function on your character blueprint.