Navigation
API > API/Runtime > API/Runtime/SlateCore
A slate widget to draw an arbitrary number of images over top of each other
| Name | SLayeredImage |
| Type | class |
| Header File | /Engine/Source/Runtime/SlateCore/Public/Widgets/Images/SLayeredImage.h |
| Include Path | #include "Widgets/Images/SLayeredImage.h" |
Syntax
class SLayeredImage : public SImage
Inheritance Hierarchy
- FSharedFromThisBase → TSharedFromThis → SWidget → SLeafWidget → SImage → SLayeredImage
- FSlateControlledConstruction → SWidget → SLeafWidget → SImage → SLayeredImage
Typedefs
| Name | Type | Remarks | Include Path |
|---|---|---|---|
| BrushAttributeType | TSlateManagedAttribute< const FSlateBrush *, EInvalidateWidgetReason::Paint > | Widgets/Images/SLayeredImage.h | |
| ColorAttributeType | TSlateManagedAttribute< FSlateColor, EInvalidateWidgetReason::Paint > | Widgets/Images/SLayeredImage.h | |
| ImageLayer | TTuple< TAttribute< const FSlateBrush * >, TAttribute< FSlateColor > > | Widgets/Images/SLayeredImage.h | |
| InnerImageLayerType | TTuple< BrushAttributeType, ColorAttributeType > | Widgets/Images/SLayeredImage.h |
Variables
Protected
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| Layers | TArray< InnerImageLayerType, TInlineAllocator< 2 > > | An array to hold the additional draw layers | Widgets/Images/SLayeredImage.h |
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void AddLayer
(
TAttribute< const FSlateBrush* > Brush |
Adds a new layer to the top of the Image given a brush and color. Use White as the default color. | Widgets/Images/SLayeredImage.h | |
void AddLayer
(
TAttribute< const FSlateBrush* > Brush, |
Adds a new layer to the top of the Image given a brush and color | Widgets/Images/SLayeredImage.h | |
void Construct
(
const FArguments& InArgs, |
Constructor that adds InLayers on top of the base image | Widgets/Images/SLayeredImage.h | |
void Construct
(
const FArguments& InArgs, |
Constructor that adds InLayers on top of the base image | Widgets/Images/SLayeredImage.h | |
void Construct
(
const FArguments& InArgs, |
Constructor that adds NumLayers blank layers on top of the image for later use | Widgets/Images/SLayeredImage.h | |
void Construct
(
const FArguments& InArgs, |
Constructor that sets the base image and any overlay layers defined in the Slate icon | Widgets/Images/SLayeredImage.h | |
void Construct
(
const FArguments& InArgs, |
Constructor that adds a single layer on top of the base image | Widgets/Images/SLayeredImage.h | |
int32 GetNumLayers() |
Returns the total number of layers, including the base image. | Widgets/Images/SLayeredImage.h | |
bool IsValidIndex
(
int32 Index |
Determines whether a Layer exists at the given index | Widgets/Images/SLayeredImage.h | |
void RemoveAllLayers() |
Removes all layers | Widgets/Images/SLayeredImage.h | |
void SetFromSlateIcon
(
const FSlateIcon& InIcon |
Sets the base image and any overlay layers defined in the Slate icon. Note: removes all layers | Widgets/Images/SLayeredImage.h | |
void SetLayerBrush
(
int32 Index, |
Sets the brush for a given layer, if it exists | Widgets/Images/SLayeredImage.h | |
void SetLayerColor
(
int32 Index, |
Sets the color for a given layer, if it exists. | Widgets/Images/SLayeredImage.h |
Overridden from SWidget
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual int32 OnPaint
(
const FPaintArgs& Args, |
Overwritten from SWidget. | Widgets/Images/SLayeredImage.h |