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.
creditswindow.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
21#include "RmlUi/Core/ElementDocument.h"
22#include "engine/application.h"
23
24namespace cqsp::client {
26 public:
29 void OpenDocument();
30 void Show();
31 void Update(double delta_time);
32 void Hide();
33 std::string GetDocumentName();
34 void ProcessEvent(Rml::Event& event);
35
36 private:
37 void LoadCreditsText();
38 void SetCreditsScroll();
39
40 Rml::ElementDocument* document;
41 Rml::Element* credits_text_element;
43
44 std::string credits_text;
45 float scroll_percentage = 0.0f;
46
47 const float scroll_speed = 50;
48 bool fast_scroll = false;
49};
50} // namespace cqsp::client
Definition: creditswindow.h:25
CreditsWindow(cqsp::engine::Application &app)
Definition: creditswindow.cpp:40
std::string GetDocumentName()
Definition: creditswindow.cpp:87
void LoadCreditsText()
Definition: creditswindow.cpp:112
cqsp::engine::Application & m_app
Definition: creditswindow.h:42
void Hide()
Definition: creditswindow.cpp:85
float scroll_percentage
Definition: creditswindow.h:45
void ProcessEvent(Rml::Event &event)
Definition: creditswindow.cpp:91
const float scroll_speed
Definition: creditswindow.h:47
~CreditsWindow()
Definition: creditswindow.cpp:42
void OpenDocument()
Definition: creditswindow.cpp:48
Rml::ElementDocument * document
Definition: creditswindow.h:40
void Show()
Definition: creditswindow.cpp:59
void Update(double delta_time)
Definition: creditswindow.cpp:66
bool fast_scroll
Definition: creditswindow.h:48
void SetCreditsScroll()
Definition: creditswindow.cpp:154
std::string credits_text
Definition: creditswindow.h:44
Rml::Element * credits_text_element
Definition: creditswindow.h:41
Definition: application.h:47
Definition: clientctx.h:21
EventListener(common::Universe *universe)
Definition: turnsavewindow.h:1