|
Player12
An open source football management simulator
|
Modal talks over an AI club's bid for one of the managed players, or its offer to borrow him. More...
#include <offer_negotiation_dialog.h>
Classes | |
| struct | Line |
| struct | RoundLine |
Public Member Functions | |
| void | open (GameController &controller, std::uint32_t offer_id) |
| bool | render (GameController &controller) |
| bool | isOpen () const |
Private Types | |
| enum class | Mode : int { Counter = 0 , NamePrice = 1 } |
Private Member Functions | |
| void | rebuild (const GameController &controller) |
| void | refreshCounterTexts () |
| void | rebuildTransferLines () |
| void | rebuildLoanLines () |
| void | renderHeader () const |
| void | renderBid () const |
| void | renderHistory () const |
| void | renderAnswer () |
| void | renderActions (GameController &controller) |
| void | renderResult () const |
| void | accept (GameController &controller) |
| void | reject (GameController &controller) |
| void | notForSale (GameController &controller) |
| void | submit (GameController &controller) |
| void | finish (std::string_view headline, const ImVec4 &color, std::string_view detail) |
Private Attributes | |
| std::uint32_t | offer_id = 0 |
| bool | open_requested = false |
| bool | visible = false |
| bool | changed = false |
| std::optional< GameController::IncomingOfferView > | view |
| std::string | title |
| std::string | subtitle |
| std::string | stance_text |
| ImVec4 | stance_color {} |
| std::vector< Line > | facts |
| std::vector< Line > | bid_lines |
| std::string | bid_total |
| std::vector< RoundLine > | rounds |
| std::string | status_text |
| ImVec4 | status_color {} |
| std::string | proposal_text |
| std::vector< UI::MoneyChip > | counter_chips |
| std::array< UI::MoneyChip, 4 > | price_chips {} |
| Mode | mode = Mode::Counter |
| TransferNegotiation::OfferTerms | counter |
| TransferNegotiation::LoanTerms | loan_counter |
| std::int64_t | price = 0 |
| std::string | counter_upfront_text |
| std::string | counter_worth_text |
| std::string | loan_wage_text |
| std::string | loan_saving_text |
| std::string | notice |
| ImVec4 | notice_color {} |
| bool | finished = false |
| std::string | result_headline |
| ImVec4 | result_color {} |
| std::string | result_detail |
Friends | |
| class | GameFlowTest_GUIFlowLifecycle_Test |
Modal talks over an AI club's bid for one of the managed players, or its offer to borrow him.
Self-contained like PlayerTalkDialog: the inbox and the transfer market each keep one, call open() from a button and render() every frame. It shows the buyer, the player (value, asking price, contract, how he feels about the move), the bid on the table broken down (fee, upfront part, instalments, add-ons, sell-on) and every round so far. The club accepts, rejects, counters with a full structure, names its price or declares the player not for sale; the buyer's answer arrives on a later day (the same day near the deadline). A loan offer shows the loan terms instead and is countered with wage share, length, purchase option or obligation, recall clause and guaranteed appearances.
Text is built when the dialog opens and after each action, never per frame; only the terms editor runs every frame.
|
strongprivate |
|
private |
|
private |
Shows the end of the talks.
|
inline |
|
private |
| void OfferNegotiationDialog::open | ( | GameController & | controller, |
| std::uint32_t | offer_id | ||
| ) |
Opens the talks over offer_id (shown from the next render()).
|
private |
|
private |
|
private |
The offer on the table, line by line.
|
private |
Upfront and present-value texts of the counter being prepared.
|
private |
| bool OfferNegotiationDialog::render | ( | GameController & | controller | ) |
Draws the dialog while open.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
friend |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
Wages saved over the loan.
|
private |
The borrower's weekly share.
|
private |
|
private |
Result of the last action while still open.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
The pending counter, while awaited.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
Awaiting reply, final offer, window.
|
private |
|
private |
|
private |
|
private |