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.
mainmenuscene.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 "client/scenes/scene.h"
23#include "creditswindow.h"
29#include "loadgamewindow.h"
30#include "settingswindow.h"
31
32namespace cqsp {
33namespace scene {
35 public:
38
39 void Init();
40 void Update(float deltaTime);
41 void Ui(float deltaTime);
42 void Render(float deltaTime);
43
44 private:
45 void ModWindow();
46
47 Rml::ElementDocument* main_menu;
48
52
54 public:
55 EventListener() = default;
56 void ProcessEvent(Rml::Event& event);
60
61 bool is_options_visible = false;
63
64 std::vector<std::string> file_list;
65 int index;
66
67 void ShuffleFileList();
68 void SetMainMenuImage(const std::string& file);
69 void NextImage();
70
71 double last_switch = 0;
72 // Change every minute
73 const float switch_time = 60;
74};
75} // namespace scene
76} // namespace cqsp
Definition: creditswindow.h:25
Definition: loadgamewindow.h:27
Definition: scene.h:23
Definition: settingswindow.h:27
Definition: application.h:47
Definition: mainmenuscene.h:53
cqsp::engine::Application * app
Definition: mainmenuscene.h:57
void ProcessEvent(Rml::Event &event)
Definition: mainmenuscene.cpp:232
MainMenuScene * m_scene
Definition: mainmenuscene.h:58
Definition: mainmenuscene.h:34
void SetMainMenuImage(const std::string &file)
Definition: mainmenuscene.cpp:220
client::CreditsWindow credits_window
Definition: mainmenuscene.h:50
MainMenuScene(cqsp::engine::Application &app)
Definition: mainmenuscene.cpp:42
void ShuffleFileList()
Definition: mainmenuscene.cpp:196
~MainMenuScene()
Definition: mainmenuscene.cpp:45
bool last_options_visible
Definition: mainmenuscene.h:62
int index
Definition: mainmenuscene.h:65
void Render(float deltaTime)
Definition: mainmenuscene.cpp:103
void NextImage()
Definition: mainmenuscene.cpp:225
std::vector< std::string > file_list
Definition: mainmenuscene.h:64
const float switch_time
Definition: mainmenuscene.h:73
bool is_options_visible
Definition: mainmenuscene.h:61
void ModWindow()
Definition: mainmenuscene.cpp:107
double last_switch
Definition: mainmenuscene.h:71
cqsp::scene::MainMenuScene::EventListener listener
void Ui(float deltaTime)
Definition: mainmenuscene.cpp:101
client::LoadGameWindow load_game_window
Definition: mainmenuscene.h:51
client::SettingsWindow settings_window
Definition: mainmenuscene.h:49
void Init()
Definition: mainmenuscene.cpp:55
Rml::ElementDocument * main_menu
Definition: mainmenuscene.h:47
void Update(float deltaTime)
Definition: mainmenuscene.cpp:73
lib tracy file(GLOB_RECURSE CPP_FILES *.cpp) list(FILTER CPP_FILES EXCLUDE REGEX ".*main.cpp$") file(GLOB_RECURSE H_FILES *.h) set(SOURCE_FILES $
Definition: CMakeLists.txt:22
When adding assets, it is extremely crucial that you read cqsp::asset::AssetLoader::LoadResources to ...
Definition: clientctx.h:21
EventListener(common::Universe *universe)
Definition: turnsavewindow.h:1