How do I specify the position of a widget on the screen?

Hello!

I have Create widget Node, it is spawn a context menu widget on viewport. I need to set up a context menu position near inventory slot, which actually is a parent to context menu. And in desirable do not use canvas but isn’t necessary.

In simple case Widget Render Transform and Slot Padding can help, but of course depends on situation…

339873-screenshot-2.png

Menu Anchors are perfect for context menus. They will automagically maintain the lifecycle of a widget and come with funky features:

339877-screenshot-5.png

1 Like

Also Named Slots. And any element that is directly parented to a Canvas can use its slot for all kind of fun stuff:

339874-screenshot-3.png

If you are Adding to Viewport, you can do this instead:

339876-screenshot-4.png

2 Likes