Profileflairexplorerpanel
Based on game build 714014 | Last updated: 2026-03-08
Overview
ProfileFlairExplorerPanel is a Redux-based UI widget responsible for presenting and managing profile flair item selection for a given player profile. It displays a character portrait puppet that updates to reflect the currently selected flair, and provides a scrolling explorer list with filtering, sorting, and search capabilities. It integrates with PlayerAvatarPortrait, ItemExplorer, FilterBar, and profile-related utility functions (wxputils, GetMostRecentlySelectedItem) to synchronize UI state with user-selected profile flair.
Usage example
local panel = ProfileFlairExplorerPanel(owner, user_profile)
self:AddChild(panel)
panel:OnShow() -- initialize and load saved selection
Dependencies & tags
Components used: None (this is a UI widget, not a component)
Tags: owned_filter, weaveableFilter, lockedFilter (used via filter states)
External modules used: ItemExplorer, FilterBar, PlayerAvatarPortrait, Widget, TEMPLATES, dlcsupport, misc_items, util
Properties
| Property | Type | Default Value | Description |
|---|---|---|---|
owner | entity or nil | nil | The entity instance that owns this panel (typically the HUD or screen entity). |
user_profile | table | nil | The user profile table containing saved selections and inventory state. |
puppet_root | Widget | nil | Root container widget for positioning the puppet and spinner. |
puppet | PlayerAvatarPortrait | nil | The portrait component that renders the character with flair applied. |
heroselector | Widget | nil | Character spinner widget used to switch characters. |
picker | ItemExplorer | nil | The explorer panel listing available profile flairs. |
filter_bar | FilterBar | nil | Filter bar container for_owned_, _weaveable, sort, and search controls. |
focus_forward | Widget | nil | Widget to receive focus when moving right from this panel. |
Main functions
_BuildItemExplorer()
- Description: Constructs and returns an
ItemExplorerinstance configured for profile flair items. Sets up layout, scroll context, and item list parameters. - Parameters: None.
- Returns:
ItemExplorer— a configured explorer widget.
OnChangedCharacter(selected)
- Description: Called when the character spinner selection changes. Triggers a refresh of the flair preview for the new character.
- Parameters:
selected(table) — data for the newly selected character. - Returns: Nothing.
OnShow()
- Description: Initializes the panel when shown. Loads the last selected character from profile, refreshes filter state, and updates the flair preview.
- Parameters: None.
- Returns: Nothing.
_RefreshPreview()
- Description: Updates the
puppetwith the currently selected background portrait and applies the selected flair (if any). Called during initialization and after character changes. - Parameters: None.
- Returns: Nothing.
OnClickedItem(item_data, is_selected)
- Description: Handles clicks on flair items in the explorer. Applies or removes the flair on the puppet depending on selection state.
- Parameters:
item_data(table) — item data includingitem_key,is_owned, etc.is_selected(boolean) — whether the item is currently selected.- Returns: Nothing.
_SetProfileFlair(item_key)
- Description: Applies the specified flair item to the
puppet. Ifnil, removes any flair. - Parameters:
item_key(string or nil) — the unique key identifying the flair item to apply. - Returns: Nothing.
_GetCurrentCharacter()
- Description: Returns the name of the currently selected character from the spinner.
- Parameters: None.
- Returns:
string— the name of the selected character.
_GetCurrentBackground()
- Description: Returns the item key of the currently selected flair background from the picker.
- Parameters: None.
- Returns:
string or nil— theitem_keyof the selected flair, ornilif none selected.
OnUpdate(dt)
- Description: Called every frame to update the puppet’s emote animation.
- Parameters:
dt(number) — delta time in seconds. - Returns: Nothing.
Events & listeners
- Listens to: None explicitly (event handling is deferred to child widgets like
ItemExplorerandFilterBar). - Pushes: None directly; relies on internal callbacks (
OnShow,OnChangedCharacter, etc.) for state updates.