How to make a widget get created at mouse location?

I’m trying to make an inventory context menu that is created when you click on an inventory slot.

So far I can not get the menu to pop up at the mouse location no matter what I try.

So click on inventory slot, create widget, put to mouse location.

Any help appreciated.

If you’re adding the widget to the viewport you can just SetPosition to cursor coordinates. If you’re adding the context menu to canvas, use AsCanvas to get the slot and then SetPosition.

It’s literally what you said:

So click on inventory slot, create
widget, put to mouse location.

Just make sure you add it to the viewport or a container that is already visible.

@SupDeity - it’s about context menu, not tooltips.

1 Like

yep sorry :stuck_out_tongue:

I’ll just add that MenuAnchor is a good way of doing context menus.