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

Modal editor of the managed club's mentoring groups. More...

#include <mentoring_dialog.h>

Classes

struct  GroupView
 
struct  Member
 

Public Member Functions

void open (GameController &controller)
 
bool render (GameController &controller)
 
bool isOpen () const
 

Private Member Functions

void rebuild (GameController &controller)
 
bool renderGroup (GameController &controller, const GroupView &group)
 
bool renderNewGroup (GameController &controller)
 
void report (const char *key, bool error)
 

Private Attributes

bool open_requested = false
 
bool visible = false
 
std::vector< GroupView > groups
 
std::vector< std::pair< PlayerID, std::string > > mentor_options
 
std::vector< std::pair< PlayerID, std::string > > mentee_options
 
std::string message
 
bool message_error = false
 

Detailed Description

Modal editor of the managed club's mentoring groups.

Self-contained: keep one instance in the hosting screen, call open() from a button and render() every frame. A senior player (25+) leads up to three youngsters (23 or younger); each group shows the personalities involved and how far the youngsters have moved so far.

Member Function Documentation

◆ isOpen()

bool MentoringDialog::isOpen ( ) const
inline

◆ open()

void MentoringDialog::open ( GameController &  controller)

◆ rebuild()

void MentoringDialog::rebuild ( GameController &  controller)
private

◆ render()

bool MentoringDialog::render ( GameController &  controller)

Draws the dialog while open.

Returns
True on frames where the groups changed.

◆ renderGroup()

bool MentoringDialog::renderGroup ( GameController &  controller,
const GroupView &  group 
)
private

◆ renderNewGroup()

bool MentoringDialog::renderNewGroup ( GameController &  controller)
private

◆ report()

void MentoringDialog::report ( const char *  key,
bool  error 
)
private

Member Data Documentation

◆ groups

std::vector<GroupView> MentoringDialog::groups
private

◆ mentee_options

std::vector<std::pair<PlayerID, std::string> > MentoringDialog::mentee_options
private

◆ mentor_options

std::vector<std::pair<PlayerID, std::string> > MentoringDialog::mentor_options
private

◆ message

std::string MentoringDialog::message
private

◆ message_error

bool MentoringDialog::message_error = false
private

◆ open_requested

bool MentoringDialog::open_requested = false
private

◆ visible

bool MentoringDialog::visible = false
private

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