FTabData
Overview
The FTabData struct is a blueprint type that holds information about each tab, including its ID, title, button class, and menu class. It is used to configure tabs when adding them to the ULimenTabMenu.
Properties
Type | Name | Access | Description |
|---|---|---|---|
FName | Id | EditAnywhere, BlueprintReadWrite | The unique identifier for the tab. |
FText | TabTitle | EditAnywhere, BlueprintReadWrite | The title of the tab displayed to the user. |
TSubclassOf< ULimenSelectableMenuButton > | TabButtonClass | EditAnywhere, BlueprintReadWrite | The class used for creating the button associated with this tab. |
TSubclassOf | TabMenuClass | EditAnywhere, BlueprintReadWrite | The class used for creating the menu content associated with this tab. |
ULimenTabMenu
Overview
The ULimenTabMenu class is a custom widget that extends UWidget. It provides functionality for adding, removing, and switching between tabs. Each tab has an associated button and menu, which are managed internally by the widget.
Properties
Type | Name | Access | Description |
|---|---|---|---|
FTabButtonClicked | OnButtonClicked | BlueprintAssignable | A delegate that is called when a tab button is clicked. |
FButtonSelectedDelegate | OnButtonSelected | BlueprintAssignable | A delegate that is called when a tab button is selected. |
FButtonSelectedDelegate | OnButtonUnselected | BlueprintAssignable | A delegate that is called when a tab button is unselected. |
Functions
Return Type | Signature | Description |
|---|---|---|
UWidget* | AddTab(const FTabData& TabData, int32 Index = -1) | Adds a new tab to the menu at the specified index or appends it if no index is provided. |
T* | AddTab (const FTabData& TabData, const int32 Index = -1) | A template function that adds a new tab and casts the result to type |
UWidget* | GetTabWidget(const FName TabId) const | Retrieves the widget associated with the specified tab ID. |
T* | GetTabWidget (const FName TabId) const | A template function that retrieves the widget associated with the specified tab ID and casts it to type |
void | ClearTabs() | Removes all tabs from the menu. |
Usage & Implementation Notes
Threading Constraints: This widget is designed for use in the Unreal Engine's main thread.
Replication Requirements: None.
Memory Lifetime Management: The widget manages the lifetime of its child widgets, ensuring proper resource release when necessary.
Initialization Dependencies: The
ULimenTabMenudepends on the presence ofULimenSelectableMenuButtonandUWidgetsubclasses for tab buttons and menus.