Slate Cannot update default CompoundWidget elements

So in my ongoing quest of creating an itembox, I have decided to tackle Slate. With some success (I at the very least got the basic layout working and it saves, as opposed to my previous endeavor, which didn’t even save after being placed in the interface) and a whole lot of problems.

I have got it working that I have a bunch of default widgets being created upon construction. Now, I am trying to link those elements to variables in a corresponding UMG Class, so that I can have default variables that I can easily update in the editor without having to alter them through blueprint. Here’s where things go wrong. For some reason, I cannot seem to update the elements, without the changes affecting the entire panel area.

As you can see, only the small white box should have been affected by the pink color, but for some reason, it affects the entire panel area.

void SBK_UIWidget_ItemboxSimple::Construct(const FArguments& InArgs)
{
	ChildSlot
		.VAlign(VAlign_Fill)
		.HAlign(HAlign_Fill)
		[
			SNew(SOverlay)
			+ SOverlay::Slot()
			.VAlign(VAlign_Top)
			.HAlign(HAlign_Left)
			[
				SNew(SImage)
				.ColorAndOpacity(InArgs._BackgroundColorAndOpacity)
				.Image(InArgs._BackgroundImage)
				.Tag(TEXT("Background"))
			]
			+ SOverlay::Slot()
				.VAlign(VAlign_Center)
				.HAlign(HAlign_Center)
				[
					SNew(STextBlock)
					.ShadowColorAndOpacity(FLinearColor::Black)
					.ColorAndOpacity(FLinearColor::Red)
					.ShadowOffset(FIntPoint(-1, 1))
					.Font(FSlateFontInfo("Veranda", 16))
					.Text(LOCTEXT("HelloSlate", "Hello, Slate!"))
				]
		];
}

int32 SBK_UIWidget_ItemboxSimple::OnPaint(const FPaintArgs& Args, const FGeometry& AllottedGeometry, const FSlateRect& MyClippingRect, FSlateWindowElementList& OutDrawElements, int32 LayerId, const FWidgetStyle& InWidgetStyle, bool bParentEnabled) const
{
	const FSlateBrush* BGImageBrush = BackgroundImage.Get();

	FArrangedChildren ArrangedChildren(EVisibility::Visible);
	{
		// The box panel has no visualization of its own; it just visualizes its children.
		this->ArrangeChildren(AllottedGeometry, ArrangedChildren);
	}

	int32 MaxLayerId = LayerId;

	for (int32 ChildIndex = 0; ChildIndex < ArrangedChildren.Num(); ++ChildIndex)
	{
		FArrangedWidget& CurWidget = ArrangedChildren[ChildIndex];
		FSlateRect ChildClipRect = MyClippingRect.IntersectionWith(CurWidget.Geometry.GetClippingRect());

		SWidget* MainIcon = &ArrangedChildren[ChildIndex].Widget->GetChildren()->GetChildAt(0).Get();

		FWidgetStyle CompoundedWidgetStyle = FWidgetStyle(InWidgetStyle)
							.BlendColorAndOpacityTint(InWidgetStyle.GetColorAndOpacityTint() * BackgroundColorAndOpacity.Get().GetColor(InWidgetStyle) * BGImageBrush->GetTint(InWidgetStyle))
							.SetForegroundColor(GetForegroundColor());		

		const int32 CurWidgetsMaxLayerId = CurWidget.Widget->Paint(Args.WithNewParent(this), CurWidget.Geometry, ChildClipRect, OutDrawElements, MaxLayerId + 1, InWidgetStyle, ShouldBeEnabled(bParentEnabled));

		MaxLayerId = FMath::Max(MaxLayerId, CurWidgetsMaxLayerId);

		const int32 CurWidgetsMaxLayerId2 = MainIcon->Paint(Args.WithNewParent(this), CurWidget.Geometry, ChildClipRect, OutDrawElements, MaxLayerId + 1, CompoundedWidgetStyle, ShouldBeEnabled(bParentEnabled));

		MaxLayerId = FMath::Max(MaxLayerId, CurWidgetsMaxLayerId2);
	}

	return MaxLayerId;
}

With traces, I have logged whether I was actually altering the correct one, and with the above setup, the widget logged was a SImage class.

Nevermind, the problem was that I should have never tried to update it in the OnPaint, since that one just affects the entire widget at once. Instead, I now update the individual components by storing their values in the UMG class, and constructing a new slate widget in the RebuiltWidget function with the updated component values. It is not optimal, since it only shows changes the moment I recompile, but it works.