FArcLobbyModel
The lobby screen's logic with no widgets in it: which view to show, what the footer may do, the status line, and the browser's ordering. The screen rebuilds only when Poll says the state it draws from changed, so a roster polled every frame does not tear the widget tree down sixty times a second.
- Module
- ArcUI
- Header
#include "ArcUI/Lobby/FArcLobbyModel.h"- Namespace
Mowo
Properties
| Type | Name | Description |
|---|---|---|
static constexpr uint16_t | kDefaultPort | Default 7777. |
Public functions
| Returns | Name | Description |
|---|---|---|
void | SetSource | |
IArcLobbySource* | Source | |
EArcLobbyView | View | |
std::vector<FArcLobbyPlayer> | Players | |
int32_t | ReadyCount | |
bool | IsLocalReady | |
bool | IsHost | |
bool | CanStart | Host, lobby phase, at least one player, everyone ready. |
std::string | StatusLine | "Waiting for 2 players to ready up", "Everyone is ready", ... |
bool | ToggleReady | |
bool | Start | |
bool | ReturnToLobby | |
void | Leave | |
std::vector<FArcLobbyServer> | SortedServers | The browser, joinable sessions first, then fuller ones, then by name. |
bool | IsFull | |
bool | Join | |
bool | ParseAddress | "host", "host:port", "[v6]:port". |
bool | ParseAddress | host:port#KEY — the key a direct join from another machine presents. |
bool | JoinAddress | |
bool | Host | |
std::string | ExitBanner | A banner for why the last session ended; cleared by Dismiss. |
void | DismissExitBanner | |
bool | Poll | True when anything the screen draws differs from the last Poll. |
std::string& | AddressDraft | The text typed into Direct Connect survives a rebuild. |
Function details
SetSource
void SetSource(std::shared_ptr<IArcLobbySource> source)Source
IArcLobbySource* Source() constView
EArcLobbyView View() constPlayers
std::vector<FArcLobbyPlayer> Players() constReadyCount
int32_t ReadyCount() constIsLocalReady
bool IsLocalReady() constIsHost
bool IsHost() constCanStart
bool CanStart() constHost, lobby phase, at least one player, everyone ready.
StatusLine
std::string StatusLine() const"Waiting for 2 players to ready up", "Everyone is ready", ...
ToggleReady
bool ToggleReady()Start
bool Start(bool force)ReturnToLobby
bool ReturnToLobby()Leave
void Leave()SortedServers
std::vector<FArcLobbyServer> SortedServers() constThe browser, joinable sessions first, then fuller ones, then by name.
IsFull
static bool IsFull(const FArcLobbyServer& server)Join
bool Join(const FArcLobbyServer& server)ParseAddress
static bool ParseAddress(const std::string& text, std::string& outHost, uint16_t& outPort)"host", "host:port", "[v6]:port". The port defaults to 7777; a port that is not 1-65535 or a host with spaces is refused before anything dials.
ParseAddress
static bool ParseAddress(const std::string& text, std::string& outHost, uint16_t& outPort, std::string& outJoinKey)host:port#KEY — the key a direct join from another machine presents.
JoinAddress
bool JoinAddress(const std::string& text)Host
bool Host()ExitBanner
std::string ExitBanner() constA banner for why the last session ended; cleared by Dismiss.
DismissExitBanner
void DismissExitBanner()Poll
bool Poll()True when anything the screen draws differs from the last Poll.
AddressDraft
std::string& AddressDraft()The text typed into Direct Connect survives a rebuild.