From e9ba514a656453bb3af4aff34aa2e58dbe485e70 Mon Sep 17 00:00:00 2001 From: Claude Date: Sat, 7 Nov 2026 21:21:54 +0100 Subject: [PATCH] Graphical client: answer the poaching yes/no questions (ANGEBOT in the Abwerben dialog) The engine asks the selling manager and the buyer a yes/no question when a poaching offer is decided (hooks.confirm). The graphical client only supplied the notice presenter, so the engine refused the offer, the controller swallowed the reason and the ANGEBOT button appeared to do nothing. The client now shows the question with the existing yes/no dialog. Fixes #80 Co-Authored-By: Claude Sonnet 5.5 --- src/app/main.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/app/main.cpp b/src/app/main.cpp index 91c4d6f..3e17bf2 100644 --- a/src/app/main.cpp +++ b/src/app/main.cpp @@ -1070,6 +1070,15 @@ int main(int argc, char** argv) { *market_backdrop, "OpenBMH - transfer_market_notice") == PendingOfferAnswer::unsupported) throw std::runtime_error("transfer market presenter stopped"); }; + // PresentManagerDialog yes/no question: poaching asks the selling manager whether the offered fee is + // fine and the buyer whether he pays the fee the DFB sets. Without this hook the engine refuses a poaching + // offer (the ANGEBOT button of the Abwerben dialog then does nothing). + hooks.confirm = [&, market_backdrop](const GameState& staged, int manager, const std::string& text) { + const auto answer = present_pending_dialog(staged, ui::loan_return_question_dialog(staged, manager, text), + *market_backdrop, "OpenBMH - transfer_market_question"); + if (answer == PendingOfferAnswer::unsupported) throw std::runtime_error("transfer market presenter stopped"); + return answer == PendingOfferAnswer::yes; + }; return hooks; }; // Forward declarations: the club, player and statistics presenters call each other, so