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.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
sysdebuggui.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 <algorithm>
20#include <functional>
21#include <map>
22#include <string>
23#include <utility>
24#include <vector>
25
27
28#define sysdebuggui_parameters \
29 cqsp::engine::Application &app, common::Universe &universe, scripting::ScriptInterface &script_interface, \
30 const std::string_view &args, CommandOutput &input
31
32namespace cqsp {
33namespace client {
34namespace systems {
36 public:
38
39 void Init();
40 void DoUI(int delta_time);
41 void DoUpdate(int delta_time);
42
43 private:
44 void CqspMetricsWindow();
45 void ShowWindows();
46 void CreateMenuBar();
47 void DrawConsole();
48 void ConsoleInput();
49 void DrawAssetWindow();
50
51 bool to_show_window = false;
53 bool to_show_imgui_about = false;
55 bool reclaim_focus = false;
56 bool scroll_to_bottom = true;
59
60 std::string command;
61 std::string asset_search;
62 std::vector<std::string> items;
63
64 typedef std::vector<std::string> CommandOutput;
65 typedef std::function<void(sysdebuggui_parameters)> DebugCommand_t;
66 std::map<std::string, std::pair<std::string, DebugCommand_t>, std::less<>> commands;
67 std::vector<ImVec2> fps_history;
68 float fps_history_len = 10;
69
70 std::map<std::string, std::vector<ImVec2>> history_maps;
71};
72} // namespace systems
73} // namespace client
74} // namespace cqsp
Definition: sysdebuggui.h:35
bool to_show_asset_window
Definition: sysdebuggui.h:58
std::function< void(sysdebuggui_parameters)> DebugCommand_t
Definition: sysdebuggui.h:65
void Init()
Definition: sysdebuggui.cpp:81
std::string command
Definition: sysdebuggui.h:60
std::map< std::string, std::pair< std::string, DebugCommand_t >, std::less<> > commands
Definition: sysdebuggui.h:66
void DrawAssetWindow()
Definition: sysdebuggui.cpp:215
bool to_show_implot_metrics
Definition: sysdebuggui.h:54
void CreateMenuBar()
Definition: sysdebuggui.cpp:127
void DoUI(int delta_time)
Definition: sysdebuggui.cpp:250
void ConsoleInput()
Definition: sysdebuggui.cpp:177
std::vector< std::string > CommandOutput
Definition: sysdebuggui.h:64
void DoUpdate(int delta_time)
Definition: sysdebuggui.cpp:270
void DrawConsole()
Definition: sysdebuggui.cpp:153
bool to_show_metrics_window
Definition: sysdebuggui.h:52
bool to_show_window
Definition: sysdebuggui.h:51
std::map< std::string, std::vector< ImVec2 > > history_maps
Definition: sysdebuggui.h:70
float fps_history_len
Definition: sysdebuggui.h:68
bool to_show_imgui_about
Definition: sysdebuggui.h:53
SysDebugMenu(cqsp::engine::Application &app)
Definition: sysdebuggui.cpp:30
std::string asset_search
Definition: sysdebuggui.h:61
bool to_show_cqsp_metrics
Definition: sysdebuggui.h:57
std::vector< std::string > items
Definition: sysdebuggui.h:62
std::vector< ImVec2 > fps_history
Definition: sysdebuggui.h:67
bool reclaim_focus
Definition: sysdebuggui.h:55
void ShowWindows()
Definition: sysdebuggui.cpp:109
bool scroll_to_bottom
Definition: sysdebuggui.h:56
void CqspMetricsWindow()
Definition: sysdebuggui.cpp:83
Definition: application.h:49
When adding assets, it is extremely crucial that you read cqsp::asset::AssetLoader::LoadResources to ...
Definition: clientctx.h:22
#define sysdebuggui_parameters
Definition: sysdebuggui.h:28