Player12
An open source football management simulator
Loading...
Searching...
No Matches
WelcomeTour Class Reference

Short welcome tour of a new career: the club, what the board expects, the next thing to do and how Continue works. More...

#include <welcome_tour.h>

Public Member Functions

void open (const GameController &controller)
 
void render ()
 
bool isOpen () const
 
std::size_t page () const
 
void next ()
 
void back ()
 
void close ()
 
const std::string & body (std::size_t index) const
 

Static Public Attributes

static constexpr std::size_t PAGE_COUNT = 4
 

Private Attributes

bool visible = false
 
bool open_requested = false
 
std::size_t current_page = 0
 
std::string club_name
 
std::array< std::string, PAGE_COUNT > bodies
 
std::string next_action_title
 
std::string next_action_reason
 

Detailed Description

Short welcome tour of a new career: the club, what the board expects, the next thing to do and how Continue works.

It opens once when a career is started from the club choice (and again on request from the Help screen), so nothing about it is stored in a save. Every page can be skipped; the texts come from the career's real state, read once when the tour opens.

Member Function Documentation

◆ back()

void WelcomeTour::back ( )

Moves to the previous page.

◆ body()

const std::string & WelcomeTour::body ( std::size_t  index) const
inline

Body text of a page (for tests).

◆ close()

void WelcomeTour::close ( )

Closes the tour.

◆ isOpen()

bool WelcomeTour::isOpen ( ) const
inline

◆ next()

void WelcomeTour::next ( )

Moves to the next page; closes after the last one.

◆ open()

void WelcomeTour::open ( const GameController &  controller)

Reads the career state and shows the first page next frame.

◆ page()

std::size_t WelcomeTour::page ( ) const
inline

◆ render()

void WelcomeTour::render ( )

Draws the tour while it is open (a modal dialog).

Member Data Documentation

◆ bodies

std::array<std::string, PAGE_COUNT> WelcomeTour::bodies
private

◆ club_name

std::string WelcomeTour::club_name
private

◆ current_page

std::size_t WelcomeTour::current_page = 0
private

◆ next_action_reason

std::string WelcomeTour::next_action_reason
private

◆ next_action_title

std::string WelcomeTour::next_action_title
private

◆ open_requested

bool WelcomeTour::open_requested = false
private

◆ PAGE_COUNT

constexpr std::size_t WelcomeTour::PAGE_COUNT = 4
staticconstexpr

Pages, in order.

◆ visible

bool WelcomeTour::visible = false
private

The documentation for this class was generated from the following files: