The stadium and its surroundings as two pages with a card model on one plate

The ground is drawn after the design: eight stands as deep as they have places,
the equipment, the fourteen objects around it, trees, cars and people on one base
plate. The stage works out itself which part lies under the pointer, the wheel
zooms and dragging moves the view. The part's card, the figures and the building
firm's offer follow the notes of the other pages.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
MichaelandClaude Fable 5.2 committed 2026-11-15 20:57:01 +01:00
1 parent 17c6d0a1d3
commit c60b0e9b2c
14 files changed
+1025 -1178

No files matched your search

+10 -1
View File
@@ -123,6 +123,11 @@ void App::drag_event(Rml::Event &event) {
}
void App::ProcessEvent(Rml::Event &event) try {
const auto type = event.GetType();
// the wheel is only listened to for the stadium's model
if (type == "mousescroll") {
if (menu_ == "stadium" && popup_.empty() && !amount_ && stadium_view_.value("dialog", std::string()).empty()) stadium_stage_event(event);
return;
}
if (notebook_home_event(event)) return;
if (tactics_page_event(event)) return;
if (engine_mode_) { engine_event(event); return; }
@@ -691,7 +696,10 @@ void App::dispatch(const std::string &action, Rml::Element *target) {
return;
}
if (action.starts_with("open:")) {
const auto route = action.substr(5);
auto route = action.substr(5);
// the surroundings are the second page of the stadium
const bool surroundings = route == "periphery";
if (surroundings) route = "stadium";
if(source_&&!demo_career_menu_available(snap().state,route)){message(snap().state.at("career").value("ended",false)?"Diese Partie ist beendet. Bitte ein neues Spiel beginnen oder einen Spielstand laden.":"Dieses Vereinsmenü ist für die Nationalmannschaft nicht verfügbar.");return;}
if (route == "kickoff")
return;
@@ -707,6 +715,7 @@ void App::dispatch(const std::string &action, Rml::Element *target) {
return;
}
if (route == "bank") { bank_view_ = "entrance"; bank_hint_.clear(); }
if (route == "stadium") { if (!stadium_view_.is_object()) stadium_view_ = Json::object(); stadium_view_["view"] = surroundings ? "panorama" : "inside"; stadium_focus_.clear(); }
menu_ = route;
report_picker_.clear();
report_detail_kind_.clear();