wavelength 1.0.0
Loading...
Searching...
No Matches
NetMainPlayersList Class Reference

List of the players of the lobby, with the details of the selected player on fn_main_play. More...

#include <netmainplayerslist.h>

Inheritance diagram for NetMainPlayersList:
Collaboration diagram for NetMainPlayersList:

Public Member Functions

 NetMainPlayersList (DataArray *pData, const char *pszPanel)
 Construct a list from its script description.
 ~NetMainPlayersList () override
 Destroy the list.
void UpdateRow (int nRow, int nItem) override
 Show the rank icon, the name, and the mute indicator of a player in a row.
void UpdateCursor () override
 Move the cursor and show the rank, the connection, and the games of the selected player.
void SetCursorSelected (bool bSelected) override
 Show or hide the cursor and the details of the selected player.
bool HandleJoypad (JoypadInputMsg *pMsg) override
 Mute or unmute the selected player with the square button, then handle the button as a list does.
void SetPlayers (std::list< LobbyPlayer > *pPlayers, int nSelected)
 Replace the players and select one.
void SetRank (int nAccount, int nRank)
 Record the rank of a player, and show it when the player is selected.
AvatarPartSet * SelectedAvatar ()
 Report the Freq of the selected player.
Public Member Functions inherited from FreqList
 ~FreqList () override=default
 Destroy the object.
 FreqList (DataArray *pData, const char *pszPanel)
 Construct the list from its script description.
void ScrollUp () override
 Select the previous item, and play the sound of the up button when the selection moved.
void ScrollDown () override
 Select the next item, and play the sound of the down button when the selection moved.
Public Member Functions inherited from UIList
 UIList (DataArray *pData, const char *pszPanel)
 Construct a list from its script description, cloning the template row once for each row.
 ~UIList () override
 Destroy the row clones and every object cloned with them.
bool DispatchPriv (Message *pMsg) override
 Pass a controller button to HandleJoypad().
void Print (PrnStream &stream) override
 Write a description of the list.
RndView * CloneRow (int nRow, RndView *pTemplate)
 Clone the template row for one row.
void BuildRowCells (RndView *pRow)
 Record the cells of a row, emptying each text and hiding each mesh.
void SetCellMat (int nRow, int nColumn, RndMat *pMat)
 Show the mesh of a cell with a material.
void SetCellText (int nRow, int nColumn, const char *pszText)
 Set the text of a cell.
void SetCellFont (int nRow, int nColumn, RndFont *pFont)
 Set the font of a cell's text.
void SetRowFont (int nRow, RndFont *pFont)
 Set the font of every text of a row.
void SetSelected (int nSelected)
 Select an item, keeping the number of items.
void Refresh (int nItemCount, int nSelected)
 Set the number of items and the selection, and fill the rows.
int GetSelected () const
int GetItemCount () const
int GetRowCount () const
RndMesh * GetUpArrow () const
RndMesh * GetDownArrow () const
void SetShowUpArrow (int nShow)
void SetShowDownArrow (int nShow)
Public Member Functions inherited from UIComponent
 UIComponent (DataArray *pData)
 Construct a showing component in the normal state.
bool Dispatch (Message *pMsg) override
 Offer a message to the focused panel of the current screen, then handle it here.
virtual bool IsShowing () const
 Report whether the component is showing.
virtual void SetShowing (bool bShowing)
 Show or hide the component.
virtual const char * Text () const
 Report the text the component shows.
virtual void SetText (const char *pszText)
 Replace the text the component shows.
virtual int GetState () const
 Report the state the component shows.
virtual void SetState (int nState, bool bForce)
 Change the state the component shows.
virtual void Focus ()
 React to the panel giving the component the focus.
virtual void Unfocus ()
 React to the panel taking the focus away.
virtual void Poll (float fTime)
 Advance the component to a time.
const char * GetName () const
int GetShowing () const
Public Member Functions inherited from MsgSink
void * operator new (size_t nSize)
 Allocate a sink from the pool heaps under the tag "MsgSink".
void operator delete (void *pBlock)
 Return a sink to the pool heaps.
virtual ~MsgSink ()
void * operator new (size_t size)
 Allocate from the main heap under the name MsgSink.
void operator delete (void *mem)
 Return memory to its heap.
virtual ~MsgSink ()
 Destroy the sink.

Static Public Member Functions

static UIComponent * New (DataArray *pData, const char *pszPanel)
 Create a list from its script description.
Static Public Member Functions inherited from UIList
static UIComponent * New (DataArray *pData, const char *pszPanel)
 Create a list from its script description.
Static Public Member Functions inherited from UIComponent
static void Init (DataArray *pConfig)
 Read the parameters of the flash a button shows when it is chosen.

Protected Attributes

int mMuteEnabled
std::list< LobbyPlayer > mPlayers
Protected Attributes inherited from UIList
UIStyle * mStyle
int mItemCount
int mRowCount
int mColumnCount
int mCursorRow
int mSelected
int mRowPitch
std::list< std::vector< Cell > > mRowCells
std::vector< RndView * > mRows
std::vector< RndText * > mTextCells
const char * mPanelName
RndMesh * mCursor
RndMesh * mUpArrow
RndMesh * mDownArrow
Transform mCursorXfm
int mShowUpArrow
int mShowDownArrow
Protected Attributes inherited from UIComponent
const char * mName
int mShowing
int mState

Additional Inherited Members

Public Types inherited from UIComponent
enum  State { kStateNormal = 0 , kStateSelected = 1 , kStateDisabled = 2 }
 The state a component shows, the values of mState and the index UIStyle selects with. More...
Static Public Attributes inherited from UIList
static constexpr int kKeepSelection = -99999
 The value of Refresh()'s selection that keeps the selected item.
Static Protected Attributes inherited from UIComponent
static int sNumFlashes
 Number of times a chosen button flashes before it reports the choice.
static float sSelectedMs
 Milliseconds of each flash a chosen button spends in the selected state.
static float sNormalMs
 Milliseconds of each flash a chosen button spends in the normal state.

Detailed Description

List of the players of the lobby, with the details of the selected player on fn_main_play.

The RTTI records the class as deriving from FreqList. Its vtable is at 0x003cf838. The square button mutes or unmutes the chat of the selected player.

Constructor & Destructor Documentation

◆ NetMainPlayersList()

NetMainPlayersList::NetMainPlayersList ( DataArray * pData,
const char * pszPanel )

Construct a list from its script description.

Parameters
pDataThe script description.
pszPanelThe name of the panel the list belongs to.
Ghidra address:
NTSC-U/C: 0x0019b5f0
Ghidra address:
PAL: 0x001a3328

◆ ~NetMainPlayersList()

NetMainPlayersList::~NetMainPlayersList ( )
inlineoverride

Destroy the list.

Ghidra address:
NTSC-U/C: 0x00360138
Ghidra address:
PAL: 0x003ce650

Member Function Documentation

◆ New()

UIComponent * NetMainPlayersList::New ( DataArray * pData,
const char * pszPanel )
inlinestatic

Create a list from its script description.

The metagame registers the routine for the component type players_list_comp.

Parameters
pDataThe script description.
pszPanelThe name of the panel the list belongs to.
Returns
The new list.
Ghidra address:
NTSC-U/C: 0x00360230
Ghidra address:
PAL: 0x003ce748

◆ UpdateRow()

void NetMainPlayersList::UpdateRow ( int nRow,
int nItem )
overridevirtual

Show the rank icon, the name, and the mute indicator of a player in a row.

Parameters
nRowThe row.
nItemThe player.
Ghidra address:
NTSC-U/C: 0x0019b678
Ghidra address:
PAL: 0x001a33b0

Reimplemented from UIList.

Reimplemented in NetRankedPlayersList.

◆ UpdateCursor()

void NetMainPlayersList::UpdateCursor ( )
overridevirtual

Move the cursor and show the rank, the connection, and the games of the selected player.

A player whose rank is not yet known is marked as requested, and the panel fn_main_play listens for the rank.

Ghidra address:
NTSC-U/C: 0x0019b8d8
Ghidra address:
PAL: 0x001a3610

Reimplemented from UIList.

Reimplemented in NetRankedPlayersList.

◆ SetCursorSelected()

void NetMainPlayersList::SetCursorSelected ( bool bSelected)
overridevirtual

Show or hide the cursor and the details of the selected player.

Parameters
bSelectedWhether the cursor shows the selected state.
Ghidra address:
NTSC-U/C: 0x0019b750
Ghidra address:
PAL: 0x001a3488

Reimplemented from UIList.

Reimplemented in NetRankedPlayersList.

◆ HandleJoypad()

bool NetMainPlayersList::HandleJoypad ( JoypadInputMsg * pMsg)
overridevirtual

Mute or unmute the selected player with the square button, then handle the button as a list does.

The player of this console cannot be muted.

Parameters
pMsgThe message of the button.
Returns
The result of UIList::HandleJoypad().
Ghidra address:
NTSC-U/C: 0x0019bdf0
Ghidra address:
PAL: 0x001a3b28

Reimplemented from UIList.

◆ SetPlayers()

void NetMainPlayersList::SetPlayers ( std::list< LobbyPlayer > * pPlayers,
int nSelected )

Replace the players and select one.

The Freq of fn_rank_p is cleared. The name is inferred.

Parameters
pPlayersThe players to copy.
nSelectedThe player to select, or -1 for the current selection.
Ghidra address:
NTSC-U/C: 0x0019bbf0
Ghidra address:
PAL: 0x001a3928

◆ SetRank()

void NetMainPlayersList::SetRank ( int nAccount,
int nRank )

Record the rank of a player, and show it when the player is selected.

The name is inferred.

Parameters
nAccountThe account of the player.
nRankThe rank.
Ghidra address:
NTSC-U/C: 0x0019bce8
Ghidra address:
PAL: 0x001a3a20

◆ SelectedAvatar()

AvatarPartSet * NetMainPlayersList::SelectedAvatar ( )

Report the Freq of the selected player.

The name is inferred.

Returns
The Freq, or null when the list is empty.
Ghidra address:
NTSC-U/C: 0x0019bd80
Ghidra address:
PAL: 0x001a3ab8

Member Data Documentation

◆ mMuteEnabled

int NetMainPlayersList::mMuteEnabled
protected

◆ mPlayers

std::list<LobbyPlayer> NetMainPlayersList::mPlayers
protected

The documentation for this class was generated from the following file: