|
Player12
An open source football management simulator
|
Modal pre-match / half-time team talk of the managed club. More...
#include <team_talk_dialog.h>
Classes | |
| struct | ToneRow |
Public Member Functions | |
| void | open (const GameController &controller, TeamTalkMoment moment, int own_goals=0, int other_goals=0) |
| bool | render (GameController &controller) |
| void | renderForMatch (GameController &controller, MatchEngine &engine, TeamID home_id, TeamID away_id) |
| bool | isOpen () const |
Private Member Functions | |
| void | renderOptions (GameController &controller) |
| void | renderResult () const |
Private Attributes | |
| TeamTalkMoment | moment = TeamTalkMoment::PreMatch |
| int | own_goals = 0 |
| int | other_goals = 0 |
| bool | open_requested = false |
| bool | dismiss_requested = false |
| bool | visible = false |
| bool | has_result = false |
| bool | pre_offered = false |
| bool | half_offered = false |
| std::array< float, 2 > | applied_talk {} |
| std::string | title |
| std::string | situation |
| std::vector< std::string > | tags |
| std::string | mood |
| std::string | leaders |
| std::vector< ToneRow > | rows |
| std::string | result_summary |
| std::string | result_counts |
| std::string | result_morale |
| ImVec4 | result_color |
Modal pre-match / half-time team talk of the managed club.
Self-contained: keep one instance per match screen. Either call open() and render() yourself, or let renderForMatch() drive it from the live engine: it opens the pre-match talk at kick-off and the half-time talk at the break.
Each tone shows its predicted reception in this situation (score, stakes, the players' personalities); the result lists how the XI took it. Besides a few morale points, the talk's outcome (GameController::getTeamTalkModifier) reaches the live match: sharper (or shakier) decisions, execution and pressing for the first minutes of the half (MatchEngine::getTeamTalkEffect).
|
inline |
| void TeamTalkDialog::open | ( | const GameController & | controller, |
| TeamTalkMoment | moment, | ||
| int | own_goals = 0, |
||
| int | other_goals = 0 |
||
| ) |
Opens the talk for moment (the score matters at half-time).
| bool TeamTalkDialog::render | ( | GameController & | controller | ) |
Draws the dialog while open.
| void TeamTalkDialog::renderForMatch | ( | GameController & | controller, |
| MatchEngine & | engine, | ||
| TeamID | home_id, | ||
| TeamID | away_id | ||
| ) |
One call per frame from a live match screen: opens the pre-match talk at kick-off and the half-time talk at the break, and withdraws an unanswered talk (without effect) once its moment has passed or the match is over. The match keeps running meanwhile. Talks given (here or before kick-off) are passed on to the engine of the managed side.
|
private |
|
private |
|
private |
Talk modifiers by half already passed to the engine.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |