group2 0.1.0
CSE 125 Group 2
Loading...
Searching...
No Matches
LobbyUI.hpp
Go to the documentation of this file.
1
3
4#pragma once
7
8#include <optional>
9#include <string_view>
10#include <vector>
11
14{
15 std::optional<bool>
17 bool startMatchClicked = false;
19 bool returnToMenuClicked = false;
22};
23
26{
27 const std::vector<LobbyPlayer>& players;
29 bool isHost;
33 std::optional<MatchConfig> matchConfig;
34 std::string_view serverName;
35 bool isHosting;
36 std::string_view hostLanIp;
37 uint16_t hostPort;
39};
40
41namespace lobby_ui
42{
43
48
49} // namespace lobby_ui
Shared lobby data types exchanged between server and clients.
Definition LobbyUI.cpp:12
BuildResult buildPlayerList(const LobbyUIConfig &config)
Render the lobby player list window and return any player actions this frame.
Definition LobbyUI.cpp:160
Output from a single lobby UI frame.
Definition LobbyUI.hpp:14
bool returnToHostConfigClicked
True if the host wants to return to HostConfig without disconnecting.
Definition LobbyUI.hpp:20
std::optional< bool > readyChange
Desired ready state change: true = ready, false = unready, nullopt = unchanged.
Definition LobbyUI.hpp:16
bool hostAddressesVisibilityToggled
True if the host toggled address visibility this frame.
Definition LobbyUI.hpp:21
bool cancelStartMatchClicked
True if the host pressed "Cancel" during countdown.
Definition LobbyUI.hpp:18
bool startMatchClicked
True if the host pressed "Start Match" this frame.
Definition LobbyUI.hpp:17
bool returnToMenuClicked
True if the user pressed "Return to Main Menu" this frame.
Definition LobbyUI.hpp:19
Associates an entity with a connected network client.
Definition ClientId.hpp:10
Input data consumed by lobby_ui::buildPlayerList each frame.
Definition LobbyUI.hpp:26
float startCountdownRemaining
Seconds remaining in the countdown.
Definition LobbyUI.hpp:32
bool canStartMatch
True when the host is allowed to start the match.
Definition LobbyUI.hpp:30
bool isHost
True if the local client is the lobby host.
Definition LobbyUI.hpp:29
bool hostAddressesVisible
True if the host address strip is currently visible.
Definition LobbyUI.hpp:38
bool startCountdownActive
True while the pre-match countdown is running.
Definition LobbyUI.hpp:31
bool isHosting
True if this client owns a local hosted server process.
Definition LobbyUI.hpp:35
std::string_view hostLanIp
Address shown to other players while this client is lobby host.
Definition LobbyUI.hpp:36
std::string_view serverName
Display name for the connected server.
Definition LobbyUI.hpp:34
std::optional< MatchConfig > matchConfig
Current match settings, if received from the server.
Definition LobbyUI.hpp:33
const std::vector< LobbyPlayer > & players
Current snapshot of all connected players.
Definition LobbyUI.hpp:27
uint16_t hostPort
Port shown to other players while this client is lobby host.
Definition LobbyUI.hpp:37
ClientId localId
This client's own ID, used to label the local player.
Definition LobbyUI.hpp:28