wavelength 1.0.0
Loading...
Searching...
No Matches
netlpadscreen.h
Go to the documentation of this file.
1#pragma once
2
3#include <list>
4
5#include "met/freqscreen.h"
10#include "script/dataarray.h"
16
28class NetLpadScreen : public FreqScreen {
29public:
36 ~NetLpadScreen() override = default;
37
45 explicit NetLpadScreen(DataArray *pData);
46
57 static UIScreen *New(DataArray *pData) {
58 return new NetLpadScreen(pData);
59 }
60
69 bool DispatchPriv(Message *pMsg) override;
70
80 void Poll(float fTime) override;
81
91 void Exit(UIScreen *pNextScreen, float fTime) override;
92
104 void Enter(UIScreen *pPrevScreen, float fTime) override;
105
114 void UpdateGameParams(const NetGameParams *pParams);
115
127
137
147
160
170
180
190
192 const std::list<NetLaunchpadPlayer> &GetPlayers() const {
193 return mPlayers;
194 }
195
197 std::list<NetLaunchpadPlayer> &GetPlayers() {
198 return mPlayers;
199 }
200
202 const char *GetButtonPanel() const {
203 return mButtonPanel;
204 }
205
206private:
207 const char *mDataPanel;
208 const char *mButtonPanel;
209 std::list<NetLaunchpadPlayer> mPlayers;
210 int mPlayersVersion;
211};
Reference-counted array of script data nodes.
Definition dataarray.h:20
FreqScreen(DataArray *pData)
Construct a screen from its script description.
Message the controller poll sends when a button is pressed or released.
Definition joypadinputmsg.h:23
Message the keyboard poll sends when a key of a USB keyboard is pressed.
Definition keyboardkeymsg.h:23
Base of every event the game passes between a MsgSource and a MsgSink.
Definition message.h:40
The settings of an online game that the host publishes with its session.
Definition netgameparams.h:13
bool HandleFocusChange(UIComponentFocusChangeMsg *pMsg)
Show the screen of the command that receives the focus in the command panel.
bool HandleSelectStart(UIComponentSelectStartMsg *pMsg)
Move the focus to the game panel when right is pressed on the player command.
std::list< NetLaunchpadPlayer > & GetPlayers()
Definition netlpadscreen.h:197
bool DispatchPriv(Message *pMsg) override
Route the messages of the screen, and pass on every other message.
static UIScreen * New(DataArray *pData)
Create a screen from its script description.
Definition netlpadscreen.h:57
void Poll(float fTime) override
Advance the screen, and show the players of the session when they change.
bool HandleKeyboardKey(KeyboardKeyMsg *pMsg)
Give a key of the USB keyboard to the chat.
bool HandleSelect(UIComponentSelectMsg *pMsg)
Run the command chosen with the cross button.
const char * GetButtonPanel() const
Definition netlpadscreen.h:202
bool HandleJoypad(JoypadInputMsg *pMsg)
Give the circle button to the chat after moving the focus to the command panel, and pass on every but...
void Enter(UIScreen *pPrevScreen, float fTime) override
Start the entry.
NetLpadScreen(DataArray *pData)
Construct the screen from its script description.
void UpdateGameParams(const NetGameParams *pParams)
Take the settings of the game the host published, and show them while this screen is the current one.
bool HandleTransitionComplete(UITransitionCompleteMsg *pMsg)
Report to the session that the screen shows, or show the lost session dialog.
const std::list< NetLaunchpadPlayer > & GetPlayers() const
Definition netlpadscreen.h:192
~NetLpadScreen() override=default
Destroy the object.
bool HandleTextEntryComplete(UITextEntryCompleteMsg *pMsg)
Give typed text to the chat.
void Exit(UIScreen *pNextScreen, float fTime) override
Start the exit, moving the focus to the command panel unless the next screen is another launchpad scr...
Message a panel sends before it moves its focus to another component.
Definition uicomponentfocuschangemsg.h:26
Message a component sends when the player chooses it.
Definition uicomponentselectmsg.h:28
Message a component sends when the player presses the button that chooses it.
Definition uicomponentselectstartmsg.h:27
UIScreen(DataArray *pData)
Construct a screen from its script description.
Message a text entry sends when the player confirms the text.
Definition uitextentrycompletemsg.h:25
Message a screen sends itself once its panels have finished their entry animations.
Definition uitransitioncompletemsg.h:23