19 virtual void NativeConstruct()
override;
23 UPROPERTY(VisibleAnywhere, BlueprintReadOnly)
24 TObjectPtr<class UTextureRenderTarget2D> RT_Canvas;
27 UPROPERTY(BlueprintReadOnly, meta=(BindWidget))
28 TObjectPtr<class UOverlay> Overlay_DrawWindow;
29 UPROPERTY(BlueprintReadOnly, meta=(BindWidget))
30 TObjectPtr<class UImage> Image_Canvas;
31 UPROPERTY(BlueprintReadOnly, meta=(BindWidget))
33 UPROPERTY(BlueprintReadOnly, meta=(BindWidget))
37 UPROPERTY(BlueprintReadOnly)
38 FVector2D prevMousePos;
39 UPROPERTY(BlueprintReadOnly)
43 virtual FReply NativeOnMouseButtonDown(const FGeometry& InGeometry, const FPointerEvent& InMouseEvent) override;
44 virtual FReply NativeOnMouseButtonUp(const FGeometry& InGeometry, const FPointerEvent& InMouseEvent) override;
45 virtual FReply NativeOnMouseMove(const FGeometry& InGeometry, const FPointerEvent& InMouseEvent) override;
49 void CloseDrawWindow();
52 void DrawLines(FVector2D mousePos, FLinearColor drawColor);
53 void DrawPoint(FVector2D mousePos, FLinearColor drawColor);
54 FVector2D GetLocalMousePos(FVector2D mousePos);
63 bool SaveRenderTargetToPNG(UTextureRenderTarget2D* RenderTarget, const FString& FullFilePath);