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.
settingswindow.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 <string>
20#include <vector>
21
22#include "RmlUi/Core/EventListener.h"
23#include "RmlUi/Core/Types.h"
24#include "engine/application.h"
25
26namespace cqsp::client {
28 public:
30
31 void ProcessEvent(Rml::Event& event);
32
33 void AddEventListeners();
37
38 void Show();
39 void Hide();
40
41 void Close();
42
43 void LoadDocument();
44 void ReloadDocument();
45
46 // Various functions for hiding the window.
47 float GetOpacity();
48 void PushToBack();
49
50 private:
51 const std::string document_name = "../data/core/gui/options.rml";
52
54
55 float ui_volume;
58
59 std::vector<Rml::Vector2i> window_sizes = {{1024, 768}, {1280, 1024}, {1280, 720}, {1280, 800}, {1360, 768},
60 {1366, 768}, {1440, 900}, {1600, 900}, {1680, 1050}, {1920, 1200},
61 {1920, 1080}, {2560, 1440}, {2560, 1080}, {3440, 1440}, {3840, 2160}};
62
63 Rml::ElementDocument* options_menu;
64 Rml::DataModelHandle model_handle;
65
67};
68} // namespace cqsp::client
Definition: settingswindow.h:27
void AddEventListeners()
Definition: settingswindow.cpp:56
void InitializeOptionVariables()
Definition: settingswindow.cpp:62
std::vector< Rml::Vector2i > window_sizes
Definition: settingswindow.h:59
void PushToBack()
Definition: settingswindow.cpp:144
void ReloadDocument()
Definition: settingswindow.cpp:134
void RemoveEventListeners()
Definition: settingswindow.cpp:88
void Show()
Definition: settingswindow.cpp:110
const std::string document_name
Definition: settingswindow.h:51
bool full_screen
Definition: settingswindow.h:57
void LoadDocument()
Definition: settingswindow.cpp:127
Rml::ElementDocument * options_menu
Definition: settingswindow.h:63
cqsp::engine::Application & GetApp()
Definition: settingswindow.h:53
void InitializeDataModel()
Definition: settingswindow.cpp:94
Rml::DataModelHandle model_handle
Definition: settingswindow.h:64
float ui_volume
Definition: settingswindow.h:55
void ProcessEvent(Rml::Event &event)
Definition: settingswindow.cpp:21
void Close()
Definition: settingswindow.cpp:120
float music_volume
Definition: settingswindow.h:56
cqsp::engine::Application & app
Definition: settingswindow.h:66
SettingsWindow(cqsp::engine::Application &app)
Definition: settingswindow.cpp:19
void Hide()
Definition: settingswindow.cpp:118
float GetOpacity()
Definition: settingswindow.cpp:140
Definition: application.h:47
Definition: clientctx.h:21
EventListener(common::Universe *universe)
Definition: turnsavewindow.h:1