Hi Guys,
I am writing a widget that is making images interactable, so it is an UImage on the surface but SCompoundWidget inside. Now I am trying to update my MyImage in the UImage by casting its MyImage.Get() as the SCompoundWidget* to a method which should take the image as I put in the Editor Page. I understand the getter should get its correspounding SImage, but I really need the image to be interactable with Mouse actions and Touch actions. Could anybody please tell me what is the right way to update MyImage after I put in the Editor?
UClass()
class USeqFrames : public UImage
{
GENERATED_BODY()
public:
UPROPERTY(EditAnywhere, BlueprintReadWrite, Category = "Sequential Frames")
UTexture2D* Textures;
UFUNCTION(BlueprintCallable, BlueprintReadWrite, Category = "Blah")
void SetTextures(UTexture2D* InTextures){
Textures = InTextures;
if(MyImage.IsValid()){
//??????
}
}
.....
}
class SSeqFrames : public SCompoundWidget
{
public:
SLATE_BEGIN_ARGS(SSeqFrames)
{}
SLATE_END_ARGS()
..............
private:
UTexture2D* Textures;
..............
public:
void SetTextures(UTexture2D* InTextures){
Textures = InTextures;
}
I really need help about this! Or could you please show me some articles about casting to different UMG and Slate class? Thank you in advance.