Files
UnrealEngineUWP/Engine/Source/Developer/ScreenShotComparison/Private/Widgets/SAsyncImage.h
ryan durand 471d972e62 Updating copyright for Engine Developer.
#rnx
#rb none


#ROBOMERGE-SOURCE: CL 10869240 via CL 10869516 via CL 10869902
#ROBOMERGE-BOT: (v613-10869866)

[CL 10870584 by ryan durand in Main branch]
2019-12-26 15:32:37 -05:00

33 lines
887 B
C++

// Copyright Epic Games, Inc. All Rights Reserved.
#pragma once
#include "Widgets/SCompoundWidget.h"
#include "Widgets/Images/SImage.h"
#include "Widgets/Images/SThrobber.h"
#include "Textures/SlateTextureData.h"
#include "Async/Async.h"
class SAsyncImage : public SCompoundWidget
{
public:
SLATE_BEGIN_ARGS(SAsyncImage) {}
SLATE_ARGUMENT(FString, ImageFilePath)
SLATE_END_ARGS()
void Construct(const FArguments& InArgs);
virtual void Tick(const FGeometry& AllottedGeometry, const double InCurrentTime, const float InDeltaTime) override;
TSharedPtr<FSlateDynamicImageBrush> GetDynamicBrush();
private:
FString ImageFilePath;
TSharedPtr<SImage> Image;
TSharedPtr<SCircularThrobber> Progress;
bool bLoaded;
TFuture<FSlateTextureDataPtr> TextureFuture;
TSharedPtr<FSlateDynamicImageBrush> DynamicBrush;
static FSlateTextureDataPtr LoadScreenshot(FString ImagePath);
};