Why are the slate attributes not being set when I pass it a value?

Hi I’ve been trying to make a custom slate tooltip, but I can’t set the text in the two text boxes in it. When I test the tooltip both boxes have false in them, I don’t know why the text attributes won’t set.

What am I doing wrong here please help?

How I’m trying to set it (look at CreateDecoratorWidget())
.H

class FRichInlineHyperLinkDecorator : public FRichTextDecorator
{
public:
	FRichInlineHyperLinkDecorator(URichTextBlock* InOwner, UHyperLinkRichTextDecorator* decorator);

	virtual bool Supports(const FTextRunParseResults& RunParseResult, const FString& Text) const override;

	AEntity_Class* Player;
	UWorld* World = Owner->GetWorld();

protected:
	virtual TSharedPtr<SWidget> CreateDecoratorWidget(const FTextRunInfo& RunInfo, const FTextBlockStyle& TextStyle) const override;

	FHyperlinkStyle linkstyle;
	FSimpleDelegate del;
	mutable FString idString;
	
};


UCLASS()
class UNREALCOC_API UHyperLinkRichTextDecorator : public URichTextBlockDecorator
{
	GENERATED_BODY()

public:
	UHyperLinkRichTextDecorator(const FObjectInitializer& ObjectInitializer);

	virtual TSharedPtr<ITextDecorator> CreateDecorator(URichTextBlock* InOwner) override;

	UPROPERTY(EditAnywhere, Category = Appearance)
	FHyperlinkStyle style;

	UFUNCTION(BlueprintNativeEvent)
	void ClickFun();
	
};

.CCP

FRichInlineHyperLinkDecorator::FRichInlineHyperLinkDecorator(URichTextBlock* InOwner, UHyperLinkRichTextDecorator* decorator) : FRichTextDecorator(InOwner)
{
	Player = Cast<AEntity_Class>(UGameplayStatics::GetPlayerCharacter(World, 0));


	linkstyle = decorator->style;

	del.BindLambda([=]() {
		decorator->ClickFun();
		});
}

bool FRichInlineHyperLinkDecorator::Supports(const FTextRunParseResults& RunParseResult, const FString& Text) const
{
	if (RunParseResult.Name == TEXT("Link") && RunParseResult.MetaData.Contains(TEXT("id")))
	{
		const FTextRange& IdRange = RunParseResult.MetaData[TEXT("id")];
		idString = Text.Mid(IdRange.BeginIndex, IdRange.EndIndex - IdRange.BeginIndex);
		return true;
	}
	return false;
}

TSharedPtr<SWidget> FRichInlineHyperLinkDecorator::CreateDecoratorWidget(const FTextRunInfo& RunInfo, const FTextBlockStyle& TextStyle) const
{
	const bool bWarnIfMissing = true;

	TSharedPtr<FSlateHyperlinkRun::FWidgetViewModel> model = MakeShareable(new FSlateHyperlinkRun::FWidgetViewModel);

	TSharedPtr<SRichTextHyperlink> Link;



	if (!RunInfo.Content.IsEmpty())
	{
		Link = SNew(SRichTextHyperlink, model.ToSharedRef()).Text(RunInfo.Content).ToolTip(SNew(SStandardTooltip)).Style(&linkstyle);
	} 
	else if (idString == "DescriptiveLink")
	{
		Link = SNew(SRichTextHyperlink, model.ToSharedRef()).Text(RunInfo.Content).ToolTip(SNew(SStandardTooltip).HeaderText(FText::FromString("Testing Header")).BodyText(FText::FromString("Testing Body"))).Style(&linkstyle);
	}
	else if (idString == "LinkTypeB")
	{
		
		Link = SNew(SRichTextHyperlink, model.ToSharedRef()).Text(RunInfo.Content).ToolTip(SNew(SStandardTooltip).HeaderText(FText::FromString("Header working")).BodyText(FText::FromString("Body working"))).Style(&linkstyle);
		
	}
	else
	{
		Link = SNew(SRichTextHyperlink, model.ToSharedRef()).Text(FText::FromString("Link")).Style(&linkstyle).OnNavigate(del);
	}

	//Old
	//TSharedPtr<SRichTextHyperlink> link = SNew(SRichTextHyperlink, model.ToSharedRef())
		//.Text(FText::FromString("link"))
		//.Style(&linkstyle)
		//.OnNavigate(del).ToolTip(SNew(SStandardTooltip).BodyText(FText::FromString("hi")).HeaderText(FText::FromString("hi")));
	
	
	//return link;
	return Link;
}



//U
UHyperLinkRichTextDecorator::UHyperLinkRichTextDecorator(const FObjectInitializer& ObjectInitializer) : Super(ObjectInitializer)
{

}

TSharedPtr<ITextDecorator> UHyperLinkRichTextDecorator::CreateDecorator(URichTextBlock* InOwner)
{
	return MakeShareable(new FRichInlineHyperLinkDecorator(InOwner, this));
}

void UHyperLinkRichTextDecorator::ClickFun_Implementation()
{
	if (GEngine) {
		GEngine->AddOnScreenDebugMessage(-1, 20, FColor::Red, "click link");
	}
}

The actual tool tip widget
.H

class UNREALCOC_API SStandardTooltip : public SToolTip
{

	SLATE_BEGIN_ARGS(SStandardTooltip) : _HeaderText(), _BodyText(), _Content(), _HeadFont(), _BodyFont(), _BorderImage(FCoreStyle::Get().GetBrush("ToolTip.Background")), _IsInteractive(false)
	{
		
	};

	//SLATE_ARGUMENT();

	/** The text displayed in this tool tip */
	SLATE_ATTRIBUTE(FText, HeaderText)

	/*The text displayed in this tool tip*/
	SLATE_ATTRIBUTE(FText, BodyText)

	/** Arbitrary content to be displayed in the tool tip; overrides any text that may be set. */
	SLATE_DEFAULT_SLOT(FArguments, Content)

	SLATE_ATTRIBUTE(FSlateFontInfo, HeadFont)

	SLATE_ATTRIBUTE(FSlateFontInfo, BodyFont)

	/** The background/border image to display */
	SLATE_ATTRIBUTE(const FSlateBrush*, BorderImage)

	/** Whether the tooltip should be considered interactive */
	SLATE_ATTRIBUTE(bool, IsInteractive)


	SLATE_END_ARGS();

public:
	//Creates the widget
	void Construct(const FArguments& InArgs);

	virtual void SetContentWidget(const TSharedRef<SWidget>& InContentWidget) override;

	virtual bool SupportsKeyboardFocus() const override{ return true; }

	virtual bool IsEmpty() const override;
	virtual bool IsInteractive() const override;
	virtual void OnOpening() override { }
	virtual void OnClosed() override { }


private:
	// Content widget.
	TWeakPtr<SWidget> WidgetContent;

	TAttribute<FText> HText;

	TAttribute<FText> BText;
	
	//FText& HoldContent;

	/*virtual const FText& GetHeader() const {
		return HText.Get();
	}

	virtual const FText& GetBody() const {
		return BText.Get();
	}*/

	

	TAttribute<FSlateFontInfo> HeadFont;

	TAttribute<FSlateFontInfo> BodyFont;

	// Wrapped content within the widget;
	TSharedPtr<SWidget> ToolTipContent;

	// The background/border image to display
	TAttribute<const FSlateBrush*> BorderImage;

	// Whether the tooltip should be considered interactive.
	TAttribute<bool> bIsInteractive;

};

.CPP

void SStandardTooltip::Construct(const FArguments& InArgs)
{
	//HText = FText::FromString("Working");
	//BText = FText::FromString("How");

	//HText = InArgs._HeaderText.IsSet();
	
	if (InArgs._HeaderText.IsSet())
	{
		HText = FText::FromString("true");
		
	}
	else
	{
		HText = FText::FromString("false");
		
	}
	
	
	if (InArgs._BodyText.IsSet())
	{
		BText = FText::FromString("true");
		
	} 
	else
	{
		BText = FText::FromString("false");
		
	}
	
	
	

	SetContentWidget(InArgs._Content.Widget);
}

void SStandardTooltip::SetContentWidget(const TSharedRef<SWidget>& InContentWidget)
{
	if (InContentWidget != SNullWidget::NullWidget)
	{
		// Widget content argument takes precedence over the text content.
		WidgetContent = InContentWidget;
	}
	

	TSharedPtr< SWidget > PinnedWidgetContent = WidgetContent.Pin();
	if (PinnedWidgetContent.IsValid())
	{
		ToolTipContent = PinnedWidgetContent;

		ChildSlot[
			SNew(STextBlock)
		];
	} 
	else
	{
		USlateBrushAsset* LoadB = LoadObject<USlateBrushAsset>(nullptr, TEXT("SlateBrushAsset'/Game/Assets/COCMaterials/ToolTip/ToolTipBrush.ToolTipBrush'"));
		FSlateRenderTransform Text(FScale2D(0.91f, 0.8f), FVector2D(0.f, 19.0f));
		FSlateRenderTransform Text2(FVector2D(0.f, 19.0f));
		//, FVector2D(0.f, 1.0f)
		FSlateRenderTransform Image(FScale2D(0.899f, 0.09));
		FSlateRenderTransform SizeBox(FScale2D(0.93f, 1.0f), FVector2D(0.f, -7.5f));

		FMargin TextMarg = FMargin(30.0, 0.0, 28.0, -3.5);
		FMargin ImMarg = FMargin(33.0, 20.0, 42.0, 0.0);
		FMargin RichtMarg = FMargin(25.5, 6.0, 23.0, 0.0);

		//LoadB->Brush.SetImageSize(FVector2D(36.1, 26.1));

		const FSlateBrush* Brush = &LoadB->Brush;
		UDataTable* DT = LoadObject<UDataTable>(nullptr, TEXT("DataTable'/Game/Font.Font'"));
		FSlateFontInfo GG = DT->FindRow<FToolTipFonts_S>(FName("Font"), "")->HeaderFont;
		FSlateFontInfo BFont = DT->FindRow<FToolTipFonts_S>(FName("Font"), "")->BodyFont;
		FSlateColor Trans = DT->FindRow<FToolTipFonts_S>(FName("Font"), "")->ReadOnlyForground;

		
		


		ChildSlot[
			SNew(SBox).MinDesiredWidth(717.2).MinDesiredHeight(517.2).MaxDesiredWidth(717.2)[
				SNew(SBorder).BorderImage(Brush)[
					
					SNew(SVerticalBox) + SVerticalBox::Slot().FillHeight(0.095f).VAlign(VAlign_Top).Padding(TextMarg)[
						SNew(STextBlock).Text(HText).ColorAndOpacity(FColor::Black).Font(GG).RenderTransform(Text)
					] + SVerticalBox::Slot().FillHeight(0.009f).VAlign(VAlign_Top).Padding(ImMarg)[
						SNew(SImage).ColorAndOpacity(FColor::Black)
					] + SVerticalBox::Slot().Padding(RichtMarg)[
						SNew(SMultiLineEditableTextBox).Text(BText).BackgroundColor(Trans).Font(BFont)
					]
				]
			]
		];

		
		
			
		
	}
}

bool SStandardTooltip::IsEmpty() const
{
	return !WidgetContent.IsValid() && (HText.Get().IsEmpty() || BText.Get().IsEmpty());
	//
}

bool SStandardTooltip::IsInteractive() const
{
	return bIsInteractive.Get();
}

This block doesn’t set the tooltip slate arguments. You might be always executing that one?
Are you testing with content within the rich tags?
Add more print strings to see where you’re going.

Hi @Chatouille thanks for the help. That was a really stupid error I missed, I was convinced the problem was with the tooltip and didn’t focus on the rich text decorator.