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.
src
client
scenes
universe
interface
debug
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
26
#include "
client/systems/sysgui.h
"
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
32
namespace
cqsp::client::systems
{
33
class
SysDebugMenu
:
public
SysUserInterface
{
34
public
:
35
explicit
SysDebugMenu
(
engine::Application
&app);
36
37
void
Init
();
38
void
DoUI
(
int
delta_time);
39
void
DoUpdate
(
int
delta_time);
40
41
private
:
42
void
CqspMetricsWindow
();
43
void
ShowWindows
();
44
void
CreateMenuBar
();
45
void
DrawConsole
();
46
void
ConsoleInput
();
47
void
DrawAssetWindow
();
48
49
bool
to_show_window
=
false
;
50
bool
to_show_metrics_window
=
false
;
51
bool
to_show_imgui_about
=
false
;
52
bool
to_show_implot_metrics
=
false
;
53
bool
reclaim_focus
=
false
;
54
bool
scroll_to_bottom
=
true
;
55
bool
to_show_cqsp_metrics
=
false
;
56
bool
to_show_asset_window
=
false
;
57
58
std::string
command
;
59
std::string
asset_search
;
60
std::vector<std::string>
items
;
61
62
typedef
std::vector<std::string>
CommandOutput
;
63
typedef
std::function<void(
sysdebuggui_parameters
)>
DebugCommand_t
;
64
std::map<std::string, std::pair<std::string, DebugCommand_t>, std::less<>>
commands
;
65
std::vector<ImVec2>
fps_history
;
66
float
fps_history_len
= 10;
67
68
std::map<std::string, std::vector<ImVec2>>
history_maps
;
69
};
70
}
// namespace cqsp::client::systems
cqsp::client::systems::SysDebugMenu
Definition:
sysdebuggui.h:33
cqsp::client::systems::SysDebugMenu::to_show_asset_window
bool to_show_asset_window
Definition:
sysdebuggui.h:56
cqsp::client::systems::SysDebugMenu::DebugCommand_t
std::function< void(sysdebuggui_parameters)> DebugCommand_t
Definition:
sysdebuggui.h:63
cqsp::client::systems::SysDebugMenu::DoUpdate
void DoUpdate(int delta_time)
Definition:
sysdebuggui.cpp:270
cqsp::client::systems::SysDebugMenu::command
std::string command
Definition:
sysdebuggui.h:58
cqsp::client::systems::SysDebugMenu::commands
std::map< std::string, std::pair< std::string, DebugCommand_t >, std::less<> > commands
Definition:
sysdebuggui.h:64
cqsp::client::systems::SysDebugMenu::to_show_implot_metrics
bool to_show_implot_metrics
Definition:
sysdebuggui.h:52
cqsp::client::systems::SysDebugMenu::CreateMenuBar
void CreateMenuBar()
Definition:
sysdebuggui.cpp:127
cqsp::client::systems::SysDebugMenu::DrawAssetWindow
void DrawAssetWindow()
Definition:
sysdebuggui.cpp:215
cqsp::client::systems::SysDebugMenu::ConsoleInput
void ConsoleInput()
Definition:
sysdebuggui.cpp:177
cqsp::client::systems::SysDebugMenu::CommandOutput
std::vector< std::string > CommandOutput
Definition:
sysdebuggui.h:62
cqsp::client::systems::SysDebugMenu::Init
void Init()
Definition:
sysdebuggui.cpp:81
cqsp::client::systems::SysDebugMenu::DrawConsole
void DrawConsole()
Definition:
sysdebuggui.cpp:153
cqsp::client::systems::SysDebugMenu::to_show_metrics_window
bool to_show_metrics_window
Definition:
sysdebuggui.h:50
cqsp::client::systems::SysDebugMenu::to_show_window
bool to_show_window
Definition:
sysdebuggui.h:49
cqsp::client::systems::SysDebugMenu::DoUI
void DoUI(int delta_time)
Definition:
sysdebuggui.cpp:250
cqsp::client::systems::SysDebugMenu::history_maps
std::map< std::string, std::vector< ImVec2 > > history_maps
Definition:
sysdebuggui.h:68
cqsp::client::systems::SysDebugMenu::fps_history_len
float fps_history_len
Definition:
sysdebuggui.h:66
cqsp::client::systems::SysDebugMenu::to_show_imgui_about
bool to_show_imgui_about
Definition:
sysdebuggui.h:51
cqsp::client::systems::SysDebugMenu::asset_search
std::string asset_search
Definition:
sysdebuggui.h:59
cqsp::client::systems::SysDebugMenu::to_show_cqsp_metrics
bool to_show_cqsp_metrics
Definition:
sysdebuggui.h:55
cqsp::client::systems::SysDebugMenu::items
std::vector< std::string > items
Definition:
sysdebuggui.h:60
cqsp::client::systems::SysDebugMenu::fps_history
std::vector< ImVec2 > fps_history
Definition:
sysdebuggui.h:65
cqsp::client::systems::SysDebugMenu::reclaim_focus
bool reclaim_focus
Definition:
sysdebuggui.h:53
cqsp::client::systems::SysDebugMenu::ShowWindows
void ShowWindows()
Definition:
sysdebuggui.cpp:109
cqsp::client::systems::SysDebugMenu::CqspMetricsWindow
void CqspMetricsWindow()
Definition:
sysdebuggui.cpp:83
cqsp::client::systems::SysDebugMenu::SysDebugMenu
SysDebugMenu(engine::Application &app)
Definition:
sysdebuggui.cpp:32
cqsp::client::systems::SysDebugMenu::scroll_to_bottom
bool scroll_to_bottom
Definition:
sysdebuggui.h:54
cqsp::client::systems::SysUserInterface
Definition:
sysgui.h:23
cqsp::engine::Application
Definition:
application.h:48
cqsp::client::systems
Definition:
goodviewer.cpp:25
sysdebuggui_parameters
#define sysdebuggui_parameters
Definition:
sysdebuggui.h:28
sysgui.h
Generated on Fri Jul 18 2025 03:54:16 for Conquer Space by
1.9.2