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
6
7#include <optional>
8#include <vector>
9
12{
13 std::optional<bool>
15 bool startMatchClicked = false;
16 bool returnToMenuClicked = false;
17};
18
21{
22 const std::vector<LobbyPlayer>& players;
24 bool isHost;
28};
29
30namespace lobby_ui
31{
32
37
38} // namespace lobby_ui
Shared lobby data types exchanged between server and clients.
Definition LobbyUI.cpp:8
BuildResult buildPlayerList(const LobbyUIConfig &config)
Render the lobby player list window and return any player actions this frame.
Definition LobbyUI.cpp:10
Output from a single lobby UI frame.
Definition LobbyUI.hpp:12
std::optional< bool > readyChange
Desired ready state change: true = ready, false = unready, nullopt = unchanged.
Definition LobbyUI.hpp:14
bool startMatchClicked
True if the host pressed "Start Match" this frame.
Definition LobbyUI.hpp:15
bool returnToMenuClicked
True if the user pressed "Return to Main Menu" this frame.
Definition LobbyUI.hpp:16
Associates an entity with a connected network client.
Definition ClientId.hpp:10
Input data consumed by lobby_ui::buildPlayerList each frame.
Definition LobbyUI.hpp:21
float startCountdownRemaining
Seconds remaining in the countdown.
Definition LobbyUI.hpp:27
bool canStartMatch
True when all non-host players are ready.
Definition LobbyUI.hpp:25
bool isHost
True if the local client is the lobby host.
Definition LobbyUI.hpp:24
bool startCountdownActive
True while the pre-match countdown is running.
Definition LobbyUI.hpp:26
const std::vector< LobbyPlayer > & players
Current snapshot of all connected players.
Definition LobbyUI.hpp:22
ClientId localId
This client's own ID, used to label the local player.
Definition LobbyUI.hpp:23