wavelength 1.0.0
Loading...
Searching...
No Matches
playersearchresultsscreen.h
Go to the documentation of this file.
1#pragma once
2
3#include "met/freqscreen.h"
6#include "os/string.h"
7#include "script/dataarray.h"
9#include "ui/uiscreen.h"
10
17public:
26
34 }
35
44 static UIScreen *New(DataArray *pData) {
45 return new PlayerSearchResultsScreen(pData);
46 }
47
56 bool DispatchPriv(Message *pMsg) override;
57
67 void Enter(UIScreen *pPrevScreen, float fTime) override;
68
75 void SetPlayer(const LobbyPlayer &player, NetChatroomInfo chatroom) {
76 mPlayer = player;
77 mChatroomName = chatroom.mName.c_str();
78 mChatroomId = chatroom.mId;
79 mInChatroom = chatroom.mId != -1;
80 }
81
82private:
93 bool HandleSelect(UIComponentSelectMsg *pMsg);
94
95 LobbyPlayer mPlayer;
96 String mChatroomName;
97 int mChatroomId;
98 int mInChatroom;
99};
Reference-counted array of script data nodes.
Definition dataarray.h:20
FreqScreen(DataArray *pData)
Construct a screen from its script description.
A player of the lobby server, as FindPlayerMsg reports it.
Definition lobbyplayer.h:16
Base of every event the game passes between a MsgSource and a MsgSink.
Definition message.h:40
void SetPlayer(const LobbyPlayer &player, NetChatroomInfo chatroom)
Set the player to show and the chatroom the player is in.
Definition playersearchresultsscreen.h:75
bool DispatchPriv(Message *pMsg) override
Route a choice to HandleSelect().
static UIScreen * New(DataArray *pData)
Produce a screen on the heap.
Definition playersearchresultsscreen.h:44
~PlayerSearchResultsScreen() override
Release the screen.
Definition playersearchresultsscreen.h:33
void Enter(UIScreen *pPrevScreen, float fTime) override
Pass the player to the fn_find_p panel, enter, and label the name, the chatroom, and the buttons.
PlayerSearchResultsScreen(DataArray *pData)
Construct a screen with no player.
Growable text buffer that is also a PrnStream.
Definition string.h:19
const char * c_str() const
Report the text.
Definition string.h:369
Message a component sends when the player chooses it.
Definition uicomponentselectmsg.h:28
UIScreen(DataArray *pData)
Construct a screen from its script description.
The description of one chat room of the online lobby.
Definition netchatroominfo.h:11
int mId
Definition netchatroominfo.h:20
String mName
Definition netchatroominfo.h:21