helo, i’m trying to create a context menu and an item inspector for my inventory, both should appear next to the slot and in both i’m not using a canvas panel. The way that i’m doing is: i’m getting the slot position and passing it to the HUD, which then passes it to these widgets to set their positions. However, it’s not working, and it’s not responsive: if I reduce the screen size, the widget moves extremely far away.
i don’t think so. as it’s the canvas that provides some of those features.
you could implement your own logic for updating the layout, i think there’s a virtual function for that. but it sounds extremely convoluted. i don’t understand your restriction of not using a canvas.
I wasn’t using a canvas to avoid each different widget with a single function using one, wasting resources, but now I’ve added them all to the hud with bind widget, the only point now is: I had managed to do it using setpoisitioninviewport, but then it wasn’t responsive and so I put everything on the canvas, but now this position doesn’t work, what do I do?
i did this to set position in canvas:
if (UCanvasPanelSlot* ContextMenuSlot = Cast(ContextMenuWidget->Slot))
{
ContextMenuSlot->SetPosition(SlotPosition);
}
it change the position of the widget, but it’s too far from the desired position, i think it’s because i’m getting the absolute position of the slot and set this position to be where my menu will go, and it’s not converted to relative position to the canvas
i wanna set position of the context menu and item inspector, but the position i’m getting is wrong, my context menu don’t even appears anymore in my screen
the value that i’m getting in the ue log is different from the position that i simulated that is the right to position my widget in the canvas, and idk what to do