Player12
An open source football management simulator
Loading...
Searching...
No Matches
about_scene.h
Go to the documentation of this file.
1// -----------------------------------------------------------------------------
2// Football Management Project
3// Copyright (c) 2025 - 2026 Flavio Milinanni. All Rights Reserved.
4//
5// This file is part of the Football Management Project.
6// See the LICENSE file in the project root.
7// -----------------------------------------------------------------------------
8
9#pragma once
10
11#include <span>
12#include <string>
13#include <vector>
14
15#include "gui/gui_scene.h"
16
18namespace Credits
19{
21{
22 const char* name;
23 const char* licence;
24 const char* file;
26};
27
29std::span<const Component> components();
30} // namespace Credits
31
37class AboutScene : public GUIScene
38{
39 public:
41 AboutScene(GUIView* guiView_ptr, bool inCareer);
42
43 void onEnter() override;
44 void update(float /*deltaTime*/) override
45 {
46 // Rendering reads current state; there is no per-frame update work.
47 }
48 void render() override;
49 [[nodiscard]] SceneID getID() const override { return SceneID::ABOUT; }
50
51 private:
52 void renderBuild();
53 void renderThirdParty();
54 void leave();
55
56 bool in_career = false;
57 std::string version_line;
58 std::string build_line;
60 std::vector<std::string> licence_texts;
61};
About screen: version and build of this copy, the game's licence status and the third-party software ...
Definition about_scene.h:38
void update(float) override
Updates scene logic.
Definition about_scene.h:44
std::string build_line
Definition about_scene.h:58
void onEnter() override
Called when the scene is entered/becomes active.
Definition about_scene.cpp:66
bool in_career
Definition about_scene.h:56
void render() override
Renders the scene.
Definition about_scene.cpp:90
void renderBuild()
Definition about_scene.cpp:132
std::string version_line
Definition about_scene.h:57
void renderThirdParty()
Definition about_scene.cpp:149
SceneID getID() const override
Gets the ID of the scene.
Definition about_scene.h:49
void leave()
Definition about_scene.cpp:82
std::vector< std::string > licence_texts
Definition about_scene.h:60
Base class for all GUI scenes.
Definition gui_scene.h:68
Main view manager for the GUI. Handles scenes and overlays.
Definition gui_view.h:29
SceneID
Identifiers for different GUI scenes.
Definition gui_scene.h:24
Third-party software credited on the About screen.
Definition about_scene.h:19
std::span< const Component > components()
Definition about_scene.cpp:59
Definition about_scene.h:21
const char * name
Definition about_scene.h:22
const char * file
Licence text under assets/licenses/.
Definition about_scene.h:24
bool tests_only
Used to test the game, not shipped with it.
Definition about_scene.h:25
const char * licence
Licence name, e.g. "zlib License".
Definition about_scene.h:23