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

"Go on holiday" planner and the assistant's report on return. More...

#include <holiday_dialog.h>

Classes

struct  Line
 

Public Member Functions

void open (GameController &controller)
 
void showSummary (const GameController &controller, const HolidaySummary &summary)
 
std::optional< HolidayPlan > render (GameController &controller)
 
bool isOpen () const
 

Private Member Functions

std::optional< HolidayPlan > renderPlan (GameController &controller)
 
void renderSummary ()
 
void refreshTarget (const GameController &controller)
 

Private Attributes

bool open_requested = false
 
bool visible = false
 
bool showing_summary = false
 
HolidayPlan plan
 
int mode = 0
 
int bid_mode = 0
 
std::int64_t bid_amount = 0
 
int crisis_count = 5
 
std::string target_text
 
bool can_leave = false
 
std::string summary_title
 
std::string summary_reason
 
ImVec4 summary_reason_color {}
 
std::vector< Line > results
 
std::string table_line
 
std::vector< std::pair< std::string, std::string > > money_rows
 
std::vector< Line > moves
 
std::vector< Line > injuries
 
std::string filed_line
 

Detailed Description

"Go on holiday" planner and the assistant's report on return.

The planner chooses how long the manager is away (a date, the next match, the next decision or the end of the transfer window), what brings him back early and which duties the assistant takes over. render() hands the plan back on the frame the manager leaves; the career hub runs it on the Continue machinery and calls showSummary() when it is done.

Member Function Documentation

◆ isOpen()

bool HolidayDialog::isOpen ( ) const
inline

◆ open()

void HolidayDialog::open ( GameController &  controller)

Opens the planner with the career's saved preferences.

◆ refreshTarget()

void HolidayDialog::refreshTarget ( const GameController &  controller)
private

◆ render()

std::optional< HolidayPlan > HolidayDialog::render ( GameController &  controller)

Draws the dialog; returns the plan on the frame the manager leaves.

◆ renderPlan()

std::optional< HolidayPlan > HolidayDialog::renderPlan ( GameController &  controller)
private

◆ renderSummary()

void HolidayDialog::renderSummary ( )
private

◆ showSummary()

void HolidayDialog::showSummary ( const GameController &  controller,
const HolidaySummary &  summary 
)

Opens the report of a finished holiday.

Member Data Documentation

◆ bid_amount

std::int64_t HolidayDialog::bid_amount = 0
private

◆ bid_mode

int HolidayDialog::bid_mode = 0
private

0 = key players, 1 = from an amount.

◆ can_leave

bool HolidayDialog::can_leave = false
private

◆ crisis_count

int HolidayDialog::crisis_count = 5
private

◆ filed_line

std::string HolidayDialog::filed_line
private

◆ injuries

std::vector<Line> HolidayDialog::injuries
private

◆ mode

int HolidayDialog::mode = 0
private

◆ money_rows

std::vector<std::pair<std::string, std::string> > HolidayDialog::money_rows
private

◆ moves

std::vector<Line> HolidayDialog::moves
private

◆ open_requested

bool HolidayDialog::open_requested = false
private

◆ plan

HolidayPlan HolidayDialog::plan
private

◆ results

std::vector<Line> HolidayDialog::results
private

◆ showing_summary

bool HolidayDialog::showing_summary = false
private

◆ summary_reason

std::string HolidayDialog::summary_reason
private

◆ summary_reason_color

ImVec4 HolidayDialog::summary_reason_color {}
private

◆ summary_title

std::string HolidayDialog::summary_title
private

◆ table_line

std::string HolidayDialog::table_line
private

◆ target_text

std::string HolidayDialog::target_text
private

◆ visible

bool HolidayDialog::visible = false
private

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