wavelength 1.0.0
Loading...
Searching...
No Matches
netmainlaunchpadspanel.h
Go to the documentation of this file.
1#pragma once
2
3#include <list>
4
5#include "met/netmainpanel.h"
9#include "script/dataarray.h"
11#include "ui/uipanel.h"
12
21public:
30 NetMainLaunchpadsPanel(DataArray *pData, const char *pszDir)
31 : NetMainPanel(pData, pszDir), mLaunchpad(0) {
32 }
33
46 static UIPanel *New(DataArray *pData, const char *pszDir) {
47 return new NetMainLaunchpadsPanel(pData, pszDir);
48 }
49
57 }
58
67 bool DispatchPriv(Message *pMsg) override;
68
75 void Focus() override;
76
83 void Unfocus() override;
84
91 void RequestUpdate() override;
92
102
113
125 void ShowPlayers(std::list<LobbyPlayer> *pPlayers, int nLaunchpad);
126
127private:
138 bool HandleLaunchpads(LobbyLaunchpadsMsg *pMsg);
139
150 bool HandleSelect(UIComponentSelectMsg *pMsg);
151
152 int mLaunchpad; // The identifier of the launchpad ShowLaunchpad() showed.
153};
Reference-counted array of script data nodes.
Definition dataarray.h:20
List of launchpads, the result of NetLobby::RequestLaunchpads().
Definition lobbylaunchpadsmsg.h:16
Base of every event the game passes between a MsgSource and a MsgSink.
Definition message.h:40
void HidePlayers()
Hide the host and the rows of the players.
NetMainLaunchpadsPanel(DataArray *pData, const char *pszDir)
Construct the panel from its script description.
Definition netmainlaunchpadspanel.h:30
void Focus() override
Take the focus and move the cursor of the list.
~NetMainLaunchpadsPanel() override
Destroy the panel.
Definition netmainlaunchpadspanel.h:56
static UIPanel * New(DataArray *pData, const char *pszDir)
Create a panel from its script description.
Definition netmainlaunchpadspanel.h:46
bool DispatchPriv(Message *pMsg) override
Route the launchpads and the choice to their handlers.
void RequestUpdate() override
Request the launchpads of the lobby.
void Unfocus() override
Lose the focus, dim the cursor of the list, and hide the players.
void ShowLaunchpad(NetLaunchpadInfo *pLaunchpad)
Show the song or the remix of a launchpad as its host, and remember the launchpad.
void ShowPlayers(std::list< LobbyPlayer > *pPlayers, int nLaunchpad)
Show the rank icons and the names of the players of the shown launchpad, or request the players again...
NetMainPanel(DataArray *pData, const char *pszDir)
Construct the panel from its script description.
Message a component sends when the player chooses it.
Definition uicomponentselectmsg.h:28
Group of components drawn from one .rnd file, which a screen shows.
Definition uipanel.h:35
The description of one online session that the lobby lists.
Definition netlaunchpadinfo.h:12