Player12
An open source football management simulator
Loading...
Searching...
No Matches
welcome_tour.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 <array>
12#include <cstddef>
13#include <string>
14
15class GameController;
16
27{
28 public:
30 static constexpr std::size_t PAGE_COUNT = 4;
31
33 void open(const GameController& controller);
34
36 void render();
37
38 [[nodiscard]] bool isOpen() const { return visible; }
39 [[nodiscard]] std::size_t page() const { return current_page; }
40
42 void next();
44 void back();
46 void close();
47
49 [[nodiscard]] const std::string& body(std::size_t index) const
50 {
51 return bodies[index];
52 }
53
54 private:
55 bool visible = false;
56 bool open_requested = false;
57 std::size_t current_page = 0;
58 std::string club_name;
59 std::array<std::string, PAGE_COUNT> bodies;
60 std::string next_action_title;
61 std::string next_action_reason;
62};
Manages the core game logic, interacting with teams, leagues, and players.
Definition game_controller.h:70
Short welcome tour of a new career: the club, what the board expects, the next thing to do and how Co...
Definition welcome_tour.h:27
void close()
Definition welcome_tour.cpp:138
std::size_t page() const
Definition welcome_tour.h:39
void render()
Definition welcome_tour.cpp:140
void open(const GameController &controller)
Definition welcome_tour.cpp:67
std::size_t current_page
Definition welcome_tour.h:57
bool open_requested
Definition welcome_tour.h:56
bool visible
Definition welcome_tour.h:55
bool isOpen() const
Definition welcome_tour.h:38
std::string next_action_reason
Definition welcome_tour.h:61
void next()
Definition welcome_tour.cpp:125
void back()
Definition welcome_tour.cpp:133
std::string club_name
Definition welcome_tour.h:58
const std::string & body(std::size_t index) const
Definition welcome_tour.h:49
std::string next_action_title
Definition welcome_tour.h:60
static constexpr std::size_t PAGE_COUNT
Definition welcome_tour.h:30
std::array< std::string, PAGE_COUNT > bodies
Definition welcome_tour.h:59
int index
Definition runtime_editor.cpp:94