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.
objecteditorscene.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 <map>
20#include <memory>
21#include <string>
22#include <utility>
23
24#include "client/scenes/scene.h"
26
27namespace cqsp::scene {
29 public:
32
33 void Init();
34 void Update(float deltaTime);
35 void Ui(float deltaTime);
36 void Render(float deltaTime);
37
38 template <class T>
39 void AddUISystem(const std::string& name) {
40 auto ui = std::make_unique<T>(GetApp());
41 ui->Init();
42 user_interfaces[name] = std::make_pair(false, std::move(ui));
43 }
44
45 private:
46 std::map<std::string, std::pair<bool, std::unique_ptr<cqsp::client::systems::SysUserInterface>>> user_interfaces;
47};
48} // namespace cqsp::scene
Definition: scene.h:23
Definition: application.h:47
Application & GetApp()
Definition: scene.h:34
Definition: objecteditorscene.h:28
void Render(float deltaTime)
Definition: objecteditorscene.cpp:58
void AddUISystem(const std::string &name)
Definition: objecteditorscene.h:39
void Update(float deltaTime)
Definition: objecteditorscene.cpp:37
void Init()
Definition: objecteditorscene.cpp:32
ObjectEditorScene(cqsp::engine::Application &app)
Definition: objecteditorscene.cpp:24
void Ui(float deltaTime)
Definition: objecteditorscene.cpp:39
std::map< std::string, std::pair< bool, std::unique_ptr< cqsp::client::systems::SysUserInterface > > > user_interfaces
Definition: objecteditorscene.h:46
Definition: loadingscene.h:26