UCommonLazyImage

A special Image widget that can show unloaded images and takes care of the loading for you!

Windows
MacOS
Linux

Inheritance Hierarchy

References

Module

CommonUI

Header

/Engine/Plugins/Experimental/CommonUI/Source/CommonUI/Public/CommonLazyImage.h

Include

#include "CommonLazyImage.h"

Syntax

[UCLASS](Programming/UnrealArchitecture/Reference/Classes#classdeclaration)()
class UCommonLazyImage : public UImage

Remarks

A special Image widget that can show unloaded images and takes care of the loading for you!

UCommonLazyImage is another wrapper for SLoadGuard, but it only handles image loading and a throbber during loading.

If this class changes to show any text, by default it will have CoreStyle styling

Constructors

Name Description

Public function

UCommonLazyImage

(
    const FObjectInitializer& ObjectIn...
)

Functions

Name Description

Public function Const UFunction BlueprintCallable, Category

bool

 

IsLoading()

Public function

FOnLoadGuard...

 

OnLoadingStateChanged()

Protected function Virtual

TSharedRef< ...

 

RebuildImageWidget()

Public function UFunction BlueprintCallable, Category

void

 

SetBrushFromLazyDisplayAsset

(
    const TSoftObjectPtr< UObject >& L...,
    bool bMatchTextureSize
)

Set the brush from a string asset ref only - expects the referenced asset to be a texture or material.

Public function UFunction BlueprintCallable, Category

void

 

SetBrushFromLazyMaterial

(
    const TSoftObjectPtr< UMaterialInte...
)

Set the brush from a lazy material asset pointer - will load the material as needed.

Public function UFunction BlueprintCallable, Category

void

 

SetBrushFromLazyTexture

(
    const TSoftObjectPtr< UTexture2D > ...,
    bool bMatchSize
)

Set the brush from a lazy texture asset pointer - will load the texture as needed.

Protected function

void

 

SetIsLoading

(
    bool bIsLoading
)

Public function UFunction BlueprintCallable, Category

void

 

SetMaterialTextureParamName

(
    FName TextureParamName
)

Establishes the name of the texture parameter on the currently applied brush material to which textures should be applied.

Overridden from UImage

Name Description

Protected function Virtual

void

 

CancelImageStreaming()

Called when we need to abort the texture being streamed in.

Protected function Virtual

void

 

OnImageStreamingComplete

(
    TSoftObjectPtr< UObject > LoadedSof...
)

Called when the image streaming completes.

Protected function Virtual

void

 

OnImageStreamingStarted

(
    TSoftObjectPtr< UObject > SoftObjec...
)

Called when the image streaming starts, after the other one was cancelled.

Public function Virtual

void

 

SetBrush

(
    const FSlateBrush& InBrush
)

Public function Virtual

void

 

SetBrushFromAsset

(
    USlateBrushAsset* Asset
)

Public function Virtual

void

 

SetBrushFromMaterial

(
    UMaterialInterface* Material
)

Public function Virtual

void

 

SetBrushFromTexture

(
    UTexture2D* Texture,
    bool bMatchSize
)

Sets the Brush to the specified Texture.

Public function Virtual

void

 

SetBrushFromTextureDynamic

(
    UTexture2DDynamic* Texture,
    bool bMatchSize
)

Sets the Brush to the specified Dynamic Texture.

Overridden from UWidget

Name Description

Protected function Virtual

const FText

 

GetPaletteCategory()

Gets the palette category of the widget

Protected function Virtual

void

 

OnWidgetRebuilt()

Function called after the underlying SWidget is constructed.

Protected function Virtual

TSharedRef< ...

 

RebuildWidget()

Function implemented by all subclasses of UWidget is called when the underlying SWidget needs to be constructed.

Protected function Virtual

void

 

SynchronizeProperties()

Applies all properties to the native widget if possible.

Overridden from UVisual

Name Description

Protected function Virtual

void

 

ReleaseSlateResources

(
    bool bReleaseChildren
)

Overridden from UObject

Name Description

Protected function Virtual Const

bool

 

CanEditChange

(
    const FProperty* InProperty
)

Called by the editor to query whether a property of this object is allowed to be modified.

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