SLayeredImage

A slate widget to draw an arbitrary number of images over top of each other

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

SlateCore

Header

/Engine/Source/Runtime/SlateCore/Public/Widgets/Images/SLayeredImage.h

Include

#include "Widgets/Images/SLayeredImage.h"

Syntax

class SLayeredImage : public SImage

Remarks

A slate widget to draw an arbitrary number of images over top of each other

Functions

Name Description

Public function

void

 

AddLayer

(
    TAttribute< const FSlateBrush*...,
    TAttribute< FSlateColor > Color
)

Adds a new layer to the top of the Image given a brush and color

Public function

void

 

Construct

(
    const FArguments& InArgs,
    const TArray< ImageLayer >& InLaye...
)

Constructor that adds InLayers on top of the base image

Public function

void

 

Construct

(
    const FArguments& InArgs,
    TArray< ImageLayer >&& InLayers
)

Constructor that adds InLayers on top of the base image

Public function

void

 

Construct

(
    const FArguments& InArgs,
    int32 NumLayers
)

Constructor that adds NumLayers blank layers on top of the image for later use

Public function

void

 

Construct

(
    const FArguments& InArgs,
    TAttribute< const FSlateBrush*...,
    TAttribute< FSlateColor > Color
)

Constructor that adds a single layer on top of the base image

Public function Const

const FSlate...

 

GetLayerBrush

(
    int32 Index
)

Gets the brush for a given layer

Public function Const

FSlateColor

 

GetLayerColor

(
    int32 Index
)

Gets the Color for a given layer

Public function Const

int32

 

GetNumLayers()

Returns the total number of layers, including the base image.

Public function Const

bool

 

IsValidIndex

(
    int32 Index
)

Determines whether a Layer exists at the given index

Public function

void

 

SetLayerBrush

(
    int32 Index,
    const TAttribute< const FSlateBrush...
)

Sets the brush for a given layer, if it exists

Public function

void

 

SetLayerBrush

(
    int32 Index,
    TAttribute< const FSlateBrush*...
)

Sets the brush for a given layer, if it exists

Public function

void

 

SetLayerColor

(
    int32 Index,
    const TAttribute< FSlateColor >& C...
)

Sets the color for a given layer, if it exists.

Public function

void

 

SetLayerColor

(
    int32 Index,
    TAttribute< FSlateColor >&& Color
)

Sets the color for a given layer, if it exists.

Overridden from SWidget

Name Description

Public function Virtual Const

int32

 

OnPaint

(
    const FPaintArgs& Args,
    const FGeometry& AllottedGeometry,
    const FSlateRect& MyCullingRect,
    FSlateWindowElementList& OutDrawEl...,
    int32 LayerId,
    const FWidgetStyle& InWidgetStyle,
    bool bParentEnabled
)

Overwritten from SWidget.

Typedefs

Name

Description

ImageLayer

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Dismiss