Navigation
API > API/Runtime > API/Runtime/SlateCore > API/Runtime/SlateCore/Widgets
Inheritance Hierarchy
References
| Module | SlateCore |
| Header | /Engine/Source/Runtime/SlateCore/Public/Widgets/SOverlay.h |
| Include | #include "Widgets/SOverlay.h" |
Syntax
class SOverlay : public SPanel
Remarks
Implements an overlay widget.
Overlay widgets allow for layering several widgets on top of each other. Each slot of an overlay represents a layer that can contain one widget. The slots will be rendered on top of each other in the order they are declared in code.
Usage: SNew(SOverlay)
- SOverlay::Slot(SNew(SMyWidget1))
- SOverlay::Slot(SNew(SMyWidget2))
- SOverlay::Slot(SNew(SMyWidget3))
Note that SWidget3 will be drawn on top of SWidget2 and SWidget1.
Variables
| Type | Name | Description | |
|---|---|---|---|
| TPanelChildren< FOverlaySlot > | Children | The SOverlay's slots; each slot contains a child widget. |
Constructors
| Type | Name | Description | |
|---|---|---|---|
SOverlay () |
Functions
| Type | Name | Description | |
|---|---|---|---|
| FScopedWidgetSlotArguments | AddSlot
(
int32 ZOrder |
Adds a slot at the specified location (ignores Z-order) | |
| void | Removes all children from the overlay | ||
| void | Construct
(
const FArguments& InArgs |
Construct this widget. | |
| int32 | GetChildIndexByZOrder
(
int32 ZOrder |
Returns the index of the child slot at the specified z-order | |
| int32 | Returns the number of child widgets | ||
| bool | HasSlotWithZOrder
(
int32 ZOrder |
Returns true if there is a child slot with the specified z-order | |
| bool | RemoveSlot
(
TSharedRef< SWidget > Widget |
Removes a widget from this overlay. | |
| void | RemoveSlot
(
int32 ZOrder |
Removes a slot at the specified location | |
| FOverlaySlot::FSlotArguments | Slot
(
int32 ZOrder |
||
| const FSlateWidgetClassData & |
Overridden from SWidget
| Type | Name | Description | |
|---|---|---|---|
| FVector2D | ComputeDesiredSize
(
float |
A Panel's desired size in the space required to arrange of its children on the screen while respecting all of the children's desired sizes and any layout-related options specified by the user. | |
| FChildren * | GetChildren () |
All widgets must provide a way to access their children in a layout-agnostic way. | |
| void | OnArrangeChildren
(
const FGeometry& AllottedGeometry, |
Panels arrange their children in a space described by the AllottedGeometry parameter. | |
| int32 | OnPaint
(
const FPaintArgs& Args, |
The widget should respond by populating the OutDrawElements array with FDrawElements that represent it and any of its children. |
Overridden from FSlateControlledConstruction
| Type | Name | Description | |
|---|---|---|---|
| const FSlateWidgetClassData & |
Classes
| Type | Name | Description | |
|---|---|---|---|
| FArguments | |||
| FOverlaySlot | A slot that support alignment of content and padding and z-order |
Typedefs
| Name | Description |
|---|---|
| FScopedWidgetSlotArguments | |
| PrivateParentType | |
| PrivateThisType | |
| Super | |
| ThisClass |