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.
sysgui.h
Go to the documentation of this file.
1/* Conquer Space
2 * Copyright (C) 2021-2023 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 "client/conquerspace.h"
20#include "engine/application.h"
21
22namespace cqsp {
23namespace client {
24namespace systems {
26 public:
28 virtual ~SysUserInterface() = default;
29 virtual void Init() = 0;
30 virtual void DoUI(int delta_time) = 0;
31 virtual void DoUpdate(int delta_time) = 0;
32
34 cqsp::common::Universe &GetUniverse() { return dynamic_cast<ConquerSpace *>(GetApp().GetGame())->m_universe; }
36 return dynamic_cast<ConquerSpace *>(GetApp().GetGame())->script_interface;
37 }
39 ImGuiWindowFlags window_flags = 0;
40
41 private:
43};
44
46 public:
48 virtual ~SysRmlUiInterface() {}
49 virtual void Update(double delta_time) = 0;
50 virtual void OpenDocument() = 0;
51
52 protected:
54 cqsp::common::Universe &GetUniverse() { return dynamic_cast<ConquerSpace *>(GetApp().GetGame())->m_universe; }
56
57 private:
59};
60} // namespace systems
61} // namespace client
62} // namespace cqsp
Definition: assetmanager.h:145
Definition: conquerspace.h:23
cqsp::engine::Application & m_app
Definition: sysgui.h:58
virtual void Update(double delta_time)=0
cqsp::asset::AssetManager & GetAssetManager()
Definition: sysgui.h:55
virtual ~SysRmlUiInterface()
Definition: sysgui.h:48
cqsp::engine::Application & GetApp()
Definition: sysgui.h:53
SysRmlUiInterface(cqsp::engine::Application &app)
Definition: sysgui.h:47
cqsp::common::Universe & GetUniverse()
Definition: sysgui.h:54
cqsp::common::Universe & GetUniverse()
Definition: sysgui.h:34
scripting::ScriptInterface & GetScriptInterface()
Definition: sysgui.h:35
cqsp::engine::Application & GetApp()
Definition: sysgui.h:33
cqsp::asset::AssetManager & GetAssetManager()
Definition: sysgui.h:38
virtual void DoUI(int delta_time)=0
virtual void DoUpdate(int delta_time)=0
SysUserInterface(cqsp::engine::Application &_app)
Definition: sysgui.h:27
ImGuiWindowFlags window_flags
Definition: sysgui.h:39
cqsp::engine::Application & m_app
Definition: sysgui.h:42
Definition: universe.h:32
Definition: application.h:47
cqsp::asset::AssetManager & GetAssetManager()
Definition: application.h:65
cqsp::engine::GameState * GetGame()
Definition: application.h:80
Definition: scripting.h:31
When adding assets, it is extremely crucial that you read cqsp::asset::AssetLoader::LoadResources to ...
Definition: clientctx.h:21