Conquer Space 0.0.0
A space themed grand strategy game set in the near future, with realistic orbital mechanics, and an emphasis on economics and politics.
clientctx.h
Go to the documentation of this file.
1/* Conquer Space
2 * Copyright (C) 2021-2025 Conquer Space
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program. If not, see <https://www.gnu.org/licenses/>.
16 */
17#pragma once
18
19#include <spdlog/spdlog.h>
20
21#include <array>
22#include <string>
23#include <variant>
24
25#include <entt/entity/entity.hpp>
26
28static const std::array tick_speeds {1000, 500, 333, 100, 50, 10, 1, -1, -2, -5, -10};
29
31 bool to_show = false;
32};
33
35 // Then set this?
36 entt::entity focused_planet = entt::null;
37 entt::entity focused_city = entt::null;
38};
39
41
43 bool to_tick = false;
44 int tick_speed = 3;
45 bool tick_once = false;
46};
47
49
51 bool select_spaceport = false;
52};
53
55 entt::entity hovered_province;
56};
57
58struct GameLoad {
59 std::string load_dir;
60};
61
62struct VisibleOrbit {};
63
64enum class MapMode {
72 /*
73 * This map mode is not intended to be actually used, this is just to force a reset of a map mode
74 */
79};
80
81struct MapModeCtx {
82 entt::entity selected_good_price;
83 bool reset_map_mode = false;
84};
85
86enum class SelectedMenu {
87 /*
88 * We don't show any menu
89 */
90 NoMenu,
97};
98
100 entt::entity province;
101};
102} // namespace cqsp::client::ctx
Definition: clientctx.h:27
static const std::array tick_speeds
Definition: clientctx.h:28
SelectedMenu
Definition: clientctx.h:86
UiDisplayMode
Definition: clientctx.h:40
@ CountrySelect
Definition: clientctx.h:40
@ Gameplay
Definition: clientctx.h:40
MapMode
Definition: clientctx.h:64
Definition: clientctx.h:34
entt::entity focused_planet
Definition: clientctx.h:36
entt::entity focused_city
Definition: clientctx.h:37
Definition: clientctx.h:58
std::string load_dir
Definition: clientctx.h:59
Definition: clientctx.h:54
entt::entity hovered_province
Definition: clientctx.h:55
Definition: clientctx.h:81
entt::entity selected_good_price
Definition: clientctx.h:82
bool reset_map_mode
Definition: clientctx.h:83
Definition: clientctx.h:42
bool to_tick
Definition: clientctx.h:43
bool tick_once
Definition: clientctx.h:45
int tick_speed
Definition: clientctx.h:44
Definition: clientctx.h:48
Definition: clientctx.h:50
bool select_spaceport
Definition: clientctx.h:51
Definition: clientctx.h:30
bool to_show
Definition: clientctx.h:31
Definition: clientctx.h:99
entt::entity province
Definition: clientctx.h:100
Definition: clientctx.h:62