wavelength 1.0.0
Loading...
Searching...
No Matches
netmainplayerspanel.h
Go to the documentation of this file.
1#pragma once
2
3#include "met/netmainpanel.h"
5#include "msg/playerrankmsg.h"
6#include "rnd/rndmesh.h"
7#include "script/dataarray.h"
8#include "ui/uipanel.h"
9
17public:
26 NetMainPlayersPanel(DataArray *pData, const char *pszDir)
27 : NetMainPanel(pData, pszDir), mShowAvatar(0) {
28 }
29
42 static UIPanel *New(DataArray *pData, const char *pszDir) {
43 return new NetMainPlayersPanel(pData, pszDir);
44 }
45
53 }
54
63 bool DispatchPriv(Message *pMsg) override;
64
73 void Enter(bool bForce, float fTime) override;
74
83 void Exit(bool bForce, float fTime) override;
84
91 void Focus() override;
92
99 void Unfocus() override;
100
107 void Draw() override;
108
115 void FinishLoad() override;
116
123 void RequestUpdate() override;
124
125private:
136 bool HandleLobbyPlayers(LobbyPlayersMsg *pMsg);
137
148 bool HandlePlayerRank(PlayerRankMsg *pMsg);
149
150 RndMesh *mAvatarMesh; // The mesh `fn_main_play_freq.mesh` the Freq is drawn on.
151 int mShowAvatar; // Whether Draw() draws the Freq, from Enter() to Exit().
152};
Reference-counted array of script data nodes.
Definition dataarray.h:20
Message that delivers the players of an online session the lobby lists.
Definition lobbyplayersmsg.h:23
Base of every event the game passes between a MsgSource and a MsgSink.
Definition message.h:40
NetMainPanel(DataArray *pData, const char *pszDir)
Construct the panel from its script description.
void Unfocus() override
Lose the focus, dim the cursor of the list, and show the help of the panel.
void RequestUpdate() override
Request the players of the lobby.
~NetMainPlayersPanel() override
Destroy the panel.
Definition netmainplayerspanel.h:52
void Enter(bool bForce, float fTime) override
Enter and draw the Freq of the selected player.
void Focus() override
Take the focus, move the cursor of the list, and show the help of the focused panel.
NetMainPlayersPanel(DataArray *pData, const char *pszDir)
Construct the panel from its script description.
Definition netmainplayerspanel.h:26
bool DispatchPriv(Message *pMsg) override
Route the players and the ranks of the lobby to their handlers.
void Draw() override
Draw the panel and the Freq of the selected player.
void Exit(bool bForce, float fTime) override
Stop drawing the Freq and exit.
static UIPanel * New(DataArray *pData, const char *pszDir)
Create a panel from its script description.
Definition netmainplayerspanel.h:42
void FinishLoad() override
Finish the load and hide the mesh of the Freq.
Message that reports the ladder position of a player whose position was requested.
Definition playerrankmsg.h:13
Triangle mesh with a material.
Definition rndmesh.h:31
Group of components drawn from one .rnd file, which a screen shows.
Definition uipanel.h:35