Tilveview confuse me...(C++)

Greetings!

I have run into a frustrating issue. There are two core issues which I suspect are somewhat related.

I am creating a Inventory for a game I am working on where the player can pickup whatever. This part on the logic side is working as intended already.

The UI is where we run into issues. To be clear we want to ensure we use as little as blueprints as possible. We want as much controll as possible. For this we have created a special class that inherits from Uuserwidget which is the inventory view for the player.

I created this to be a TileView which would then contain the amount of items the player has picked up. I am making sure the system can handle a arbitrary amount of items for if we ever desire to alter the amount of items the player can have/hold by a huge amount that it is a small problem.
I also created a InventoryItemWidget, these are the EntryWidgets that will be used to display the items.

Allot of this already works quite well.

Here is a screenshot of how it looks ingame

Something that is very important is that each item widget has the correct item referenced to it. I do this with a simple int32 as the player object has an array with all the slots, so if you have the correct ID you can reference the correct item.
During the creation of the TileView and each time it is updated I run the following code for each item.

UInventoryItemWidget* newItem = CreateWidget(this->GetWorld(), ItemWidgetClass);
if(newItem != NULL){
if (InventoryTileView == NULL) {
DebugUtility::WriteLog(“Made a new TileView”, DebugUtility::DebugLevel::Log, DebugUtility::DebugCategory::Inventory);
InventoryTileView = NewObject();
}
if (newItem == NULL) {
DebugUtility::WriteLog(“New item Is null!!”, DebugUtility::DebugLevel::Warning, DebugUtility::DebugCategory::Inventory);
return;
}
newItem->Setup(this, slot;
InventoryTileView->AddItem(newItem);

	//DebugUtility::WriteLog("Added item to tileview", DebugUtility::DebugLevel::Log, DebugUtility::DebugCategory::Inventory);
}

By looking into how the memory pans out I can see these variables get set properly. But once we are in the NativeConstruct of the inventory widget the value of itemSlot gets reset to the default value of 0. This is a big problem because now all of them will utilize the name and thumbnail of the first item regardless of which one they really are…

void UInventoryItemWidget::Setup(UInventoryWidget * creator, const int32 & slot)

The signature from setup above.
The code found in native construct below

  APGT_ProjectPawn* character = Cast<APGT_ProjectPawn>(UGameplayStatics::GetPlayerPawn(this, 0));
	if (itemTextBox == NULL) {
		itemTextBox = NewObject<UTextBlock>();
	}

	itemTextBox->SetText(FText().FromString(character->GetItemNameAtInvetorySlot(this->itemSlot)));

	if (itemThumbnail == NULL) {
		itemThumbnail = NewObject<UImage>();
	}

	FSlateBrush brush;
	brush.SetResourceObject(character->GetThumbnailAtInvetorySlot(this->itemSlot));
	itemThumbnail->SetBrush(brush);

Later however when the button is pressed(through a workaround that I don’t like) each slot has the correct slot. So when I click on an item it actually runs the correct logic, removing the item from the relevant slot.

Issue 2.
The Buttons from the inventoryItemWidget(so the ones in the TileView) do not react to the mouse like other buttons do. I have no idea why these suddenly don’t work. The button pressed didn’t work but I made a simple workaround using blueprints for that which is the following:

image?

Now like I said I hate this, but the way we normally do button binding doesn’t seem to work, while this does… Really frustrating. It should be noted that it ONLY works for the On Item Clicked. The other two don’t work…(If the other two also worked I would’ve been able to live with it as then I could still make the UI react to where the players mouse is)

I’ve been debugging this with one of my project teammates for the last week and we’ve made some discoveries with how it works, but nothing that actually solves our issue so far, any help would be appreciated!

Is any further information required?

Did you solve it?
Same problem to me