|
Player12
An open source football management simulator
|
Modal contract talks with a player and his agent: a transfer target whose fee is agreed, a free agent, a pre-contract or the renewal of a managed player's contract. More...
#include <contract_talks_dialog.h>
Classes | |
| struct | Line |
Public Types | |
| enum class | Event : std::uint8_t { None , Proposed , Signed } |
Public Member Functions | |
| bool | open (GameController &controller, PlayerID player_id) |
| Event | render (GameController &controller) |
| bool | isOpen () const |
| const std::string & | signedMessage () const |
Private Member Functions | |
| void | refreshDemands (GameController &controller) |
| void | refreshYearLabels (const GameController &controller) |
| void | refreshSummary () |
| void | propose (GameController &controller) |
| void | renderTerms () |
| void | renderSummary () const |
Private Attributes | |
| bool | open_requested = false |
| bool | visible = false |
| PlayerID | player_id = 0 |
| std::string | player |
| TransferNegotiation::ContractKind | kind |
| std::uint8_t | current_years = 0 |
| std::uint8_t | first_year = 1 |
| std::uint8_t | last_year = 1 |
| int | first_season_end = 0 |
| std::int64_t | wage_room = 0 |
| std::int64_t | budget = 0 |
| TransferNegotiation::ContractDemand | demand |
| PlayerAgent::Demands | agent |
| SquadRole | projected {} |
| TransferNegotiation::ContractOffer | offer |
| std::int64_t | agent_fee = 0 |
| int | promise_index = 0 |
| int | rise_index = 0 |
| std::optional< TransferNegotiation::ContractResponse > | response |
| GameController::PlayerActionBlock | block |
| bool | over_budget = false |
| int | rounds_left = 0 |
| bool | signed_up = false |
| std::string | title |
| std::string | kind_text |
| std::vector< Line > | demand_lines |
| std::vector< std::string > | agent_lines |
| std::vector< std::string > | year_texts |
| std::vector< const char * > | year_labels |
| std::string | yearly_text |
| std::string | total_text |
| std::string | rounds_text |
| std::string | signed_message |
Friends | |
| class | GameFlowTest_GUIFlowLifecycle_Test |
Modal contract talks with a player and his agent: a transfer target whose fee is agreed, a free agent, a pre-contract or the renewal of a managed player's contract.
Self-contained like OfferNegotiationDialog: the transfer market and the player profile each keep one, call open() and render() every frame. The club proposes the wage, the contract's end, a signing-on fee, a yearly rise, appearance money, a release clause, the agent's fee and a playing-time promise; the agent's demands, his line for every round and the budget impact are shown beside. Text is built on open and after each proposal, never per frame.
|
strong |
| Enumerator | |
|---|---|
| None | |
| Proposed | A proposal was answered (refresh views). |
| Signed | He signed: signedMessage() says what. |
|
inline |
| bool ContractTalksDialog::open | ( | GameController & | controller, |
| PlayerID | player_id | ||
| ) |
Opens talks with player_id; false when no talks are possible.
|
private |
|
private |
|
private |
|
private |
| ContractTalksDialog::Event ContractTalksDialog::render | ( | GameController & | controller | ) |
|
private |
|
private |
|
inline |
|
friend |
|
private |
|
private |
|
private |
Oldest first.
|
private |
|
private |
Transfer money for fees.
|
private |
Renewal: seasons left now.
|
private |
|
private |
|
private |
Year of the current season's end.
|
private |
Shortest contract on offer.
|
private |
|
private |
|
private |
Longest contract allowed.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
0 = no promise.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
Before this contract.
|
private |
|
private |
|
private |