UOverlay
#include "Components/Overlay.h" Description
Stacks multiple child widgets on top of each other, each using simple flow layout within its layer. Commonly used to composite a label or icon over a background image.
Caveats & Gotchas
- • Children are rendered in add-order with the last child on top. To dynamically reorder layers, use UCanvasPanel with Z-order slots instead.
- • Alignment per child is set on UOverlaySlot. All children occupy the same space — the overlay's size is the maximum desired size of all children.
- • Unlike UCanvasPanel, UOverlay does not support anchoring or absolute positioning.
Example
Layer a centered label over a fill background C++
UOverlaySlot* BgSlot = MyOverlay->AddChildToOverlay(BackgroundImage);
BgSlot->SetHorizontalAlignment(HAlign_Fill);
BgSlot->SetVerticalAlignment(VAlign_Fill);
UOverlaySlot* LabelSlot = MyOverlay->AddChildToOverlay(LabelText);
LabelSlot->SetHorizontalAlignment(HAlign_Center);
LabelSlot->SetVerticalAlignment(VAlign_Center); See Also
Version History
Introduced in: 4.5
| Version | Status | Notes |
|---|---|---|
| 5.6 | stable | — |
Feedback
Was this helpful?