Button ListView Entry
- Base:
- UUserWidget
- Type:
- UNButtonListViewEntry + UNButtonListViewEntryObject
- Header File:
- NexusUI/Public/Widgets/NButtonListViewEntry.h
A reusable UNListView entry widget that renders a UButton with a child UCommonTextBlock label, driven by a bound UNButtonListViewEntryObject data model. Hover, press, and release transitions swap the button's foreground/background colors using palette slots on the bound data object — so a single Blueprint widget can render rows in any color scheme by populating the data object's per-state ENColor fields.
Used by the UNActorPools and UNDynamicRefs developer overlays as the per-object button rows you click to focus an actor.
What It Is​
- Two-Type Pattern:
UNButtonListViewEntryis the widget;UNButtonListViewEntryObjectis theUObjectrow data fed into the UNListView. Each row's data object carries the label text, aTargetObjectpayload, and per-state palette colors. - Hover/Press/Release: Native click and pointer events recolor the button and label using the bound data object's palette slots.
- Click Forwarding: Pressing the button fires the data object's
OnPressedEventdelegate, passing the row'sTargetObjectto subscribers.
Bound Widgets​
| Widget | Type | Role |
|---|---|---|
Button | UButton | The pressable surface; click/hover events drive the color transitions. |
Text | UCommonTextBlock | The button's label, pulled from the bound data object's Text field. |
Behavior​
NativeConstruct()wiresButton->OnClicked,OnHovered,OnUnhovered, andOnReleasedto internal handlers that recolor the button.NativeOnListItemObjectSet(UObject*)receives theUNButtonListViewEntryObject, copies its label intoText, and binds the button'sOnClickedto the object'sOnPressedso the click forwards out viaOnPressedEvent.NativeOnEntryReleased()unbinds the row from the data object when the list view recycles the row.NativeDestruct()unwires every button delegate, including when the boundButtonhas already been torn down.
Data Object — UNButtonListViewEntryObject​
UCLASS(BlueprintType)
class NEXUSUI_API UNButtonListViewEntryObject : public UObject
The data model is a plain UObject (not the widget itself) that the list view binds to one row. The widget reads the following fields when its row is created:
| Field | Default | Purpose |
|---|---|---|
Text | empty | Label rendered in the button. |
TargetObject | nullptr | Arbitrary payload forwarded to OnPressedEvent subscribers. |
HoverStateForegroundColor | NC_White | Text color while the pointer hovers. |
HoverStateBackgroundColor | NC_BlueLight | Button color while the pointer hovers. |
PressedStateForegroundColor | NC_White | Text color while pressed. |
PressedStateBackgroundColor | NC_BlueDark | Button color while pressed. |
UnhoveredStateForegroundColor | NC_White | Idle text color. |
UnhoveredStateBackgroundColor | NC_GreyDark | Idle button color. |
The data object also exposes an OnPressedEvent delegate that fires when the bound button is clicked — subscribers receive the row's TargetObject for context.
Construct one UNButtonListViewEntryObject per row, set its Text and TargetObject, bind your handler to OnPressedEvent, then push the array of objects into a UNListView configured to use UNButtonListViewEntry (or a Blueprint subclass of it). The plugin's developer overlays follow this pattern verbatim.