UMG change button state

Is there a way to force the hover overlay to go away with blueprinting? Because I am using drag drop and when I move the item away from where I clicked the hoverstate persist until you go back to the same button and hover over it again and take the mouse away…

I personally would not recommend using button widgets with drag and drop because of their built-in functionality for state switching which is not exposed.

You can easily replicate button functionality using nothing more than a border widget as it contains events for MouseButtonUp, MouseButtonDown and OnMouseMove. That way you can create your own logic for displaying an onHover which would not trigger in case of drag operation detected.

Hope this helps :slight_smile:

(My inventory system is based of the UMG inventory tutorial) I am not directly using the button for the drag and drop operation rather just the image above the button. And I never move the buttons either. I only get the Index of the button and get the corresponding item from the array, then when I drop I get the index of that and swap them and refresh the image. so the drag and drop is mostly done with arrays. when I think about it I just realized that I have actually changed the inventory system to never use the button for anything else than aesthetics the on clicked event in the image is driving the action menu and moving, I can probably work around that using your suggestion.