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-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 "client/conquerspace.h"
20#include "engine/application.h"
21
22namespace cqsp::client::systems {
24 public:
25 explicit SysUserInterface(engine::Application &_app) : m_app(_app) {}
26 virtual ~SysUserInterface() = default;
27 virtual void Init() = 0;
28 virtual void DoUI(int delta_time) = 0;
29 virtual void DoUpdate(int delta_time) = 0;
30
32 common::Universe &GetUniverse() { return dynamic_cast<ConquerSpace *>(GetApp().GetGame())->m_universe; }
34 return dynamic_cast<ConquerSpace *>(GetApp().GetGame())->script_interface;
35 }
37 ImGuiWindowFlags window_flags = 0;
38
39 private:
41};
42
44 public:
46 virtual ~SysRmlUiInterface() {}
47 virtual void Update(double delta_time) = 0;
48 virtual void OpenDocument() = 0;
49
50 protected:
52 common::Universe &GetUniverse() { return dynamic_cast<ConquerSpace *>(GetApp().GetGame())->m_universe; }
54
55 private:
57};
58} // namespace cqsp::client::systems
Definition: assetmanager.h:46
Definition: conquerspace.h:24
virtual void Update(double delta_time)=0
SysRmlUiInterface(engine::Application &app)
Definition: sysgui.h:45
engine::Application & m_app
Definition: sysgui.h:56
common::Universe & GetUniverse()
Definition: sysgui.h:52
virtual ~SysRmlUiInterface()
Definition: sysgui.h:46
engine::Application & GetApp()
Definition: sysgui.h:51
asset::AssetManager & GetAssetManager()
Definition: sysgui.h:53
engine::Application & m_app
Definition: sysgui.h:40
scripting::ScriptInterface & GetScriptInterface()
Definition: sysgui.h:33
common::Universe & GetUniverse()
Definition: sysgui.h:32
virtual void DoUI(int delta_time)=0
virtual void DoUpdate(int delta_time)=0
SysUserInterface(engine::Application &_app)
Definition: sysgui.h:25
ImGuiWindowFlags window_flags
Definition: sysgui.h:37
asset::AssetManager & GetAssetManager()
Definition: sysgui.h:36
engine::Application & GetApp()
Definition: sysgui.h:31
Definition: universe.h:33
Definition: application.h:48
cqsp::asset::AssetManager & GetAssetManager()
Definition: application.h:66
cqsp::engine::GameState * GetGame()
Definition: application.h:81
Definition: scripting.h:30
Definition: goodviewer.cpp:25