wavelength 1.0.0
Loading...
Searching...
No Matches
netmainplayerslist.h
Go to the documentation of this file.
1#pragma once
2
3#include <list>
4
6#include "met/freqlist.h"
9#include "script/dataarray.h"
10
18public:
27 NetMainPlayersList(DataArray *pData, const char *pszPanel);
28
40 static UIComponent *New(DataArray *pData, const char *pszPanel) {
41 return new NetMainPlayersList(pData, pszPanel);
42 }
43
51 }
52
61 void UpdateRow(int nRow, int nItem) override;
62
72 void UpdateCursor() override;
73
81 void SetCursorSelected(bool bSelected) override;
82
94 bool HandleJoypad(JoypadInputMsg *pMsg) override;
95
106 void SetPlayers(std::list<LobbyPlayer> *pPlayers, int nSelected);
107
118 void SetRank(int nAccount, int nRank);
119
130
131protected:
132 int mMuteEnabled; // Whether the square button mutes the selected player.
133 std::list<LobbyPlayer> mPlayers; // The players of the list.
134};
Parts and colours of a player's avatar, the Freq the Freq maker edits.
Definition avatarpartset.h:23
Reference-counted array of script data nodes.
Definition dataarray.h:20
FreqList(DataArray *pData, const char *pszPanel)
Construct the list from its script description.
Message the controller poll sends when a button is pressed or released.
Definition joypadinputmsg.h:23
bool HandleJoypad(JoypadInputMsg *pMsg) override
Mute or unmute the selected player with the square button, then handle the button as a list does.
~NetMainPlayersList() override
Destroy the list.
Definition netmainplayerslist.h:50
std::list< LobbyPlayer > mPlayers
Definition netmainplayerslist.h:133
void SetRank(int nAccount, int nRank)
Record the rank of a player, and show it when the player is selected.
void SetCursorSelected(bool bSelected) override
Show or hide the cursor and the details of the selected player.
AvatarPartSet * SelectedAvatar()
Report the Freq of the selected player.
NetMainPlayersList(DataArray *pData, const char *pszPanel)
Construct a list from its script description.
void SetPlayers(std::list< LobbyPlayer > *pPlayers, int nSelected)
Replace the players and select one.
void UpdateCursor() override
Move the cursor and show the rank, the connection, and the games of the selected player.
int mMuteEnabled
Definition netmainplayerslist.h:132
void UpdateRow(int nRow, int nItem) override
Show the rank icon, the name, and the mute indicator of a player in a row.
static UIComponent * New(DataArray *pData, const char *pszPanel)
Create a list from its script description.
Definition netmainplayerslist.h:40
UIComponent(DataArray *pData)
Construct a showing component in the normal state.
Definition uicomponent.h:37