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