Just wanted to say that I solved it, but I went into SCompoundWidget class and used slate instead. For those that are searching for the answer of how to change tab with input from HUD. In your SCompoundWidget header:
//...
void UpdateTab(int32 InputTabIndex);
private:
int32 TabIndex;
//Getter
int32 GetCurrentTabIndex() const { return TabIndex; }
//...
in your SCompoundWidget cpp:
//...
SNew(SWidgetSwitcher) //Tab1
.WidgetIndex(this, &SMyCompoundWidget::GetCurrentTabIndex)
+SWidgetSwitcher::Slot()
[
//...
]
+ SWidgetSwitcher::Slot() //Tab2
[
//...
]
+ SWidgetSwitcher::Slot() //Tab3
[
//...
]
//...
}
void SMyCompoundWidget::UpdateTab(const int32 InputTabIndex)
{
TabIndex = InputTabIndex;
}
The function UpdateTab is called from MyHud with the int32 using value 0,1,2. I used this tutorial as guidance