#pragma once #include "CoreMinimal.h" #include "UObject/NoExportTypes.h" #include "UObject/NoExportTypes.h" #include "UObject/NoExportTypes.h" #include "Components/ActorComponent.h" #include "Templates/SubclassOf.h" #include "WidgetToRenderTargetComponent.generated.h" class ULocalPlayer; class UMaterialInstanceDynamic; class UMaterialInterface; class UTextureRenderTarget2D; class UUserWidget; UCLASS(Blueprintable, EditInlineNew, ClassGroup=Custom, meta=(BlueprintSpawnableComponent)) class UWidgetToRenderTargetComponent : public UActorComponent { GENERATED_BODY() public: protected: UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true)) TSubclassOf WidgetClass; UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true)) FIntPoint DrawSize; UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true)) bool bManuallyRedraw; UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true)) bool bRedrawRequested; UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true)) float RedrawTime; UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true)) float LastWidgetRenderTime; UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true)) bool bWindowFocusable; UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true)) FIntPoint CurrentDrawSize; UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true)) bool bDrawAtDesiredSize; UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true)) FVector2D Pivot; UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true)) UMaterialInterface* BaseMaterial; UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true)) ULocalPlayer* OwnerPlayer; UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true)) FLinearColor BackgroundColor; UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true)) FLinearColor TintColorAndOpacity; UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true)) float OpacityFromTexture; UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true)) bool bIsTwoSided; UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true)) bool TickWhenOffscreen; UPROPERTY(BlueprintReadWrite, DuplicateTransient, EditAnywhere, Instanced, Transient, meta=(AllowPrivateAccess=true)) UUserWidget* Widget; UPROPERTY(BlueprintReadWrite, DuplicateTransient, EditAnywhere, Transient, meta=(AllowPrivateAccess=true)) UTextureRenderTarget2D* RenderTarget; UPROPERTY(BlueprintReadWrite, DuplicateTransient, EditAnywhere, Transient, meta=(AllowPrivateAccess=true)) UMaterialInstanceDynamic* MaterialInstance; UPROPERTY(BlueprintReadWrite, EditAnywhere, meta=(AllowPrivateAccess=true)) bool bEditTimeUsable; public: UWidgetToRenderTargetComponent(); UFUNCTION(BlueprintCallable) void SetWidget(UUserWidget* NewWidget); UFUNCTION(BlueprintCallable) void SetOwnerPlayer(ULocalPlayer* LocalPlayer); UFUNCTION(BlueprintCallable) void SetBackgroundColor(const FLinearColor NewBackgroundColor); UFUNCTION(BlueprintCallable) void RequestRedraw(); UFUNCTION(BlueprintCallable, BlueprintPure) UUserWidget* GetUserWidgetObject() const; UFUNCTION(BlueprintCallable, BlueprintPure) UTextureRenderTarget2D* GetRenderTarget() const; UFUNCTION(BlueprintCallable, BlueprintPure) ULocalPlayer* GetOwnerPlayer() const; UFUNCTION(BlueprintCallable, BlueprintPure) UMaterialInstanceDynamic* GetMaterialInstance() const; };