// Fill out your copyright notice in the Description page of Project Settings. #pragma once #include "CoreMinimal.h" #include "SLeafWidget.h" #include "Render/UpdatableTexture.h" /** * */ class ARONA_API SUpdatableTexture : public SLeafWidget { public: SLATE_BEGIN_ARGS(SUpdatableTexture) {} SLATE_ARGUMENT(TSharedPtr, Texture) SLATE_END_ARGS() /** Constructs this widget with InArgs */ void Construct(const FArguments& InArgs); virtual FVector2D ComputeDesiredSize(float LayoutScaleMultiplier) const override { return Texture->GetSize(); } virtual int32 OnPaint(const FPaintArgs& Args, const FGeometry& AllottedGeometry, const FSlateRect& MyCullingRect, FSlateWindowElementList& OutDrawElements, int32 LayerId, const FWidgetStyle& InWidgetStyle, bool bParentEnabled) const override; TSharedPtr GetTexture() const { return Texture; } private: TSharedPtr Texture; };