You've already forked UnrealEngineUWP
mirror of
https://github.com/izzy2lost/UnrealEngineUWP.git
synced 2026-03-26 18:15:20 -07:00
#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]
33 lines
887 B
C++
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);
|
|
}; |