UiPartyIcons
The UiPartyIcons class renders the party member icons on the HUD — four slots showing the first two characters of each member's name, with leader highlighting. Clicking any icon opens the Party menu to the Members tab. Tooltips show the member's full (sanitized) name and role.
UiPartyIcons private
Extends UiComponent.
Properties
| Name | Type | Description |
|---|---|---|
ui | Ui | Current Ui instance. Inherited from UiComponent. |
componentElem | HTMLElement | The root #hud-party-icons DOM element. Inherited from UiComponent. |
iconElems | HTMLElement[] | Array of four .hud-party-member elements (indexed 0–3). |
partyMembers | Array | The current party members data from the latest partyMembersUpdated event. |
Methods
constructor()
function constructor(ui: Ui): voidInitializes the four party member slots, attaches click handlers and UiTooltip instances (displaying sanitized name + role), registers a listener for partyMembersUpdated, and configures grawlix with the grawlix-racism plugin.
update()
function update(): voidIterates the four icon slots. For occupied slots, removes is-empty, sets the icon text to the first two characters of the member's display name, and toggles is-leader. For empty slots, adds is-empty and clears content.
onIconClick()
function onIconClick(i: number): (event: MouseEvent) => voidReturns a click handler that cancels all active overlays, hides the shop menu, opens the party menu, and sets it to the "Members" tab.
onPartyMembersUpdate()
function onPartyMembersUpdate(partyMembers: Array): voidStores the party members data and calls update().