group2 0.1.0
CSE 125 Group 2
Loading...
Searching...
No Matches
HostConfigUI.hpp
Go to the documentation of this file.
1
3
4#pragma once
5
7
8#include <cstdint>
9#include <string_view>
10
13{
15 bool serverRunning = false;
16 bool canManageServer = false;
17 bool ownsLocalProcess = false;
19 uint16_t boundPort = 0;
20 std::string_view errorMessage;
21};
22
25{
26 bool launchClicked = false;
27 bool updateClicked = false;
28 bool shutdownClicked = false;
29 bool goToLobbyClicked = false;
30 bool backToMainMenuClicked = false;
31};
32
33namespace host_config_ui
34{
35
40
44HostConfigResult buildHostConfigContents(const HostConfigUIInputs& inputs, bool showBackRow = true);
45} // namespace host_config_ui
Client-side owner for a locally launched authoritative server process.
Definition HostConfigUI.cpp:14
HostConfigResult buildHostConfigMenu(const HostConfigUIInputs &inputs)
Render the host-configuration window and return requested actions.
Definition HostConfigUI.cpp:234
HostConfigResult buildHostConfigContents(const HostConfigUIInputs &inputs, bool showBackRow)
Render host-configuration controls inside an already-open ImGui window/tab.
Definition HostConfigUI.cpp:21
User actions emitted by the host-configuration UI for one frame.
Definition HostConfigUI.hpp:25
bool shutdownClicked
True if the user pressed "Shutdown" this frame.
Definition HostConfigUI.hpp:28
bool goToLobbyClicked
True if the user wants to enter the lobby.
Definition HostConfigUI.hpp:29
bool updateClicked
True if the user pressed "Update Settings" this frame.
Definition HostConfigUI.hpp:27
bool backToMainMenuClicked
True if the user wants to return to the main menu.
Definition HostConfigUI.hpp:30
bool launchClicked
True if the user pressed "Launch" this frame.
Definition HostConfigUI.hpp:26
Persistent host-screen options used when launching a local server.
Definition HostedServer.hpp:17
Inputs needed to render the host-configuration UI for one frame.
Definition HostConfigUI.hpp:13
std::string_view errorMessage
Last launch error, empty when none.
Definition HostConfigUI.hpp:20
bool hasUnsavedServerChanges
True if draft settings differ from server state.
Definition HostConfigUI.hpp:18
uint16_t boundPort
Actual bound server port when running.
Definition HostConfigUI.hpp:19
bool canManageServer
True if the local client is authorized to manage server settings.
Definition HostConfigUI.hpp:16
bool serverRunning
True if the client is connected to a server session.
Definition HostConfigUI.hpp:15
HostConfigState & draft
Mutable draft settings bound to the widgets.
Definition HostConfigUI.hpp:14
bool ownsLocalProcess
True if this app still owns the hosted child process.
Definition HostConfigUI.hpp:17