|
Player12
An open source football management simulator
|
Pieces shared by the transfer dialogs: the structured offer editor (fee, upfront share, instalments, add-ons, sell-on), captions, panels and right-aligned action rows. More...
Functions | |
| void | formLabel (const char *text) |
| void | alignActions (std::initializer_list< const char * > labels) |
| bool | beginPanel (const char *id, const char *title) |
| void | endPanel () |
| bool | snapToOptions (TransferNegotiation::OfferTerms &terms) |
| bool | edit (TransferNegotiation::OfferTerms &terms, std::span< const UI::MoneyChip > fee_chips) |
| bool | snapLoanToOptions (TransferNegotiation::LoanTerms &terms) |
| bool | editLoan (TransferNegotiation::LoanTerms &terms, std::uint32_t market_value) |
| std::string | loanTermsLine (const TransferNegotiation::LoanTerms &terms) |
| std::string | structureText (const TransferNegotiation::OfferTerms &terms) |
| template<typename T , typename V > | |
| int | optionIndex (std::span< const T > options, V value) |
| template<typename T , std::size_t N, typename V > | |
| int | optionIndex (const std::array< T, N > &options, V value) |
Variables | |
| constexpr std::array< std::uint8_t, 7 > | UPFRONT_OPTIONS |
| constexpr std::array< const char *, 7 > | UPFRONT_LABELS |
| constexpr std::array< const char *, 5 > | YEAR_LABELS |
| constexpr std::array< std::uint16_t, 4 > | APPEARANCE_TARGETS |
| constexpr std::array< std::uint16_t, 4 > | GOAL_TARGETS = {5, 10, 15, 20} |
| constexpr std::array< std::uint8_t, 7 > | SELL_ON_OPTIONS |
| constexpr std::array< const char *, 7 > | SELL_ON_LABELS |
| constexpr std::uint8_t | DEFAULT_INSTALMENT_YEARS = 2 |
| constexpr std::int64_t | FEE_STEP = 10'000 |
| constexpr int | LOAN_WAGE_SHARE_STEP = 5 |
| constexpr std::array< std::uint8_t, 7 > | MIN_APPEARANCE_OPTIONS |
Pieces shared by the transfer dialogs: the structured offer editor (fee, upfront share, instalments, add-ons, sell-on), captions, panels and right-aligned action rows.
| void TransferTermsEditor::alignActions | ( | std::initializer_list< const char * > | labels | ) |
Moves the cursor so the buttons labelled labels end at the right edge (null labels are skipped).
| bool TransferTermsEditor::beginPanel | ( | const char * | id, |
| const char * | title | ||
| ) |
Card-looking panel for dialogs, built on a one-cell table instead of a child window so an auto-sized dialog fits its content on the first frame. Pair with endPanel() when it returns true.
| bool TransferTermsEditor::edit | ( | TransferNegotiation::OfferTerms & | terms, |
| std::span< const UI::MoneyChip > | fee_chips | ||
| ) |
Editor of a structured club-to-club offer: the fee (with fee_chips), the upfront share and instalment years, appearance and goal add-ons with their targets and the sell-on share. Returns true when a value changed.
| bool TransferTermsEditor::editLoan | ( | TransferNegotiation::LoanTerms & | terms, |
| std::uint32_t | market_value | ||
| ) |
Editor of loan terms: length, the borrower's share of the wage, loan fee, a purchase option or obligation with its fee (chips from market_value), a recall clause and guaranteed appearances with the fee owed if he plays fewer. Returns true when a value changed.
| void TransferTermsEditor::endPanel | ( | ) |
| void TransferTermsEditor::formLabel | ( | const char * | text | ) |
Small muted caption above a dialog field.
| std::string TransferTermsEditor::loanTermsLine | ( | const TransferNegotiation::LoanTerms & | terms | ) |
Loan terms in one line: "60% of wage, to the season's end · fee €100K · option €2.0M · recall · 10 apps or €200K".
| int TransferTermsEditor::optionIndex | ( | const std::array< T, N > & | options, |
| V | value | ||
| ) |
| int TransferTermsEditor::optionIndex | ( | std::span< const T > | options, |
| V | value | ||
| ) |
Index of value among options (the nearest one if absent).
| bool TransferTermsEditor::snapLoanToOptions | ( | TransferNegotiation::LoanTerms & | terms | ) |
Snaps loan terms onto the editor's steps; true when something moved.
| bool TransferTermsEditor::snapToOptions | ( | TransferNegotiation::OfferTerms & | terms | ) |
Snaps a structure onto the editor's segments (upfront share, instalment years, add-on targets, sell-on), so what is highlighted is what is sent. Every value the buyer AI proposes is already a segment; this only moves values of older saves. Returns true when something changed.
| std::string TransferTermsEditor::structureText | ( | const TransferNegotiation::OfferTerms & | terms | ) |
Payment structure in words: "Cash" or "60% upfront, 3 yrs".
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |