Investments as a page of their own, and the stadium's name as a third contract

Merchandise, press work and fan work move from advertising to a page of their
own, with international marketing beside them; advertising gains the naming
right of the stadium. The two new places are shown and say that the game does
not know them yet.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
MichaelandClaude Fable 5.2 committed 2026-11-15 23:28:33 +01:00
1 parent e912269a49
commit 7bdf47d7fd
9 files changed
+114 -45

No files matched your search

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.6 MiB

+20
View File
@@ -141,6 +141,26 @@
1,
1
]
},
"investment.scene.international": {
"file": "investment-international.png",
"sha256": "ec583de4f0ef923c77eadde9331a0139c2948bfbc4480e9945ab8ace2367f2de",
"crop": [
0,
0,
1,
1
]
},
"advertising.scene.arena": {
"file": "advertising-arena.png",
"sha256": "79575de80c3a28a2e1dba1153c551e195f31671281731aebbc7997229c1bde12",
"crop": [
0,
0,
1,
1
]
}
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 MiB

+14
View File
@@ -736,3 +736,17 @@ body.midnight .cp-map-name,body.matchday .cp-map-name {color:#f0ece2;font-effect
.ad-note {display:flex;flex-direction:column;flex:none;gap:14dp;width:519dp;height:528dp;padding:32dp 34dp;font-size:28dp;line-height:38dp;}
.ad-note span {display:block;}
.ad-mark {display:block;flex:none;border-radius:36dp;font-family:Display;text-align:center;color:#ffffff;}
/* the larger pictures: a wide one for the third contract, big ones for the investments */
.ad-tiles.wide {flex:none;width:1860dp;}
.ad-tile.wide,.ad-tile.wide:hover,.ad-tile.wide:focus,.ad-tile.wide:disabled {width:1056dp;}
.ad-tile.wide .ad-tile-art {width:1056dp;}
.ad-tile.wide .ad-tile-cap,.ad-tile.wide .ad-tile-over {width:1052dp;}
.ad-tile.big,.ad-tile.big:hover,.ad-tile.big:focus,.ad-tile.big:disabled {width:921dp;height:801dp;}
.ad-tile.big .ad-tile-art {width:921dp;height:690dp;}
.ad-tile.big .ad-tile-over {top:490dp;width:917dp;}
.ad-tile.big .ad-tile-cap {top:690dp;display:flex;align-items:center;justify-content:space-between;width:917dp;height:107dp;line-height:54dp;padding:0 40dp;font-size:43dp;}
.ad-tile-cap strong {display:block;font-family:Display;font-weight:normal;font-size:43dp;white-space:nowrap;color:var(--p-a8);}
.ad-tile:disabled,.ad-tile[disabled] {opacity:1;}
.ad-note.wide {width:1056dp;}
.ad-help {display:block;font-size:27dp;line-height:36dp;}
+68 -41
View File
@@ -101,50 +101,77 @@ std::string App::render_advertising() {
const auto terms = [&](const Json &slot) {
return std::to_string(slot.value("months", 0)) + (slot.value("months", 0) == 1 ? " Monat" : " Monate") + " · " + ad_cash(slot.value("amount", int64_t(0))) + " / Monat";
};
std::string out = "<section class=\"pg-page\" id=\"ad-underlay\"><div class=\"pg-row pg-grow\" style=\"align-items:stretch;\"><div class=\"pg-col\" style=\"width:" + pg(ad_ground_w) + ";flex:none;\"><div class=\"ad-ground\" role=\"group\" aria-label=\"Vierzehn Werbebanden\">" +
picture(renderer_.diagram("advertising-ground", ad_ground_svg(taken, advertising_selected_ >= 0 && advertising_selected_ < 14 ? advertising_selected_ : -1), 2400), ad_ground_w * 2.25, ad_ground_h * 2.25);
for (int i = 0; i < 14; ++i) {
const auto &c = slots[size_t(i)];
const auto b = ad_board(i);
const bool on = taken[size_t(i)];
const auto name = c.at("name").get<std::string>();
// the boards at the ends are read from the pitch: their writing stands upright
const std::string face = "<span class=\"ad-board-face" + std::string(b.turn > 0 ? " right" : b.turn < 0 ? " left" : "") + "\" style=\"" + (b.turn ? "left:" + pg((b.w - b.h) / 2) + ";top:" + pg((b.h - b.w) / 2) + ";width:" + pg(b.h) + ";height:" + pg(b.w) + ";" : std::string()) +
"\"><span class=\"ad-board-no\">BANDE " + std::to_string(i + 1) + "</span><strong class=\"" + (on ? "" : "free") + "\">" + esc(on ? name : "Platz frei") + "</strong></span>";
out += btn("ad-contract", face, std::string("ad-board") + (on ? " on" : "") + (advertising_selected_ == i ? " selected" : ""),
"id=\"ad-contract-" + std::to_string(i) + "\" data-ad-contract=\"" + std::to_string(i) + "\" data-id=\"" + std::to_string(i) + "\" aria-pressed=\"" + (advertising_selected_ == i ? "true" : "false") + "\" aria-label=\"Bande " + std::to_string(i + 1) + ", " +
esc(on ? name + ", " + terms(c) : std::string("Platz frei")) + "\" title=\"" + esc(on ? name + " · " + terms(c) : std::string("Platz frei · anklicken für Angebote")) + "\" style=\"left:" + pg(b.x) + ";top:" + pg(b.y) + ";width:" + pg(b.w) + ";height:" + pg(b.h) + ";\"");
}
out += "</div><div class=\"pg-panel ad-forecast\">" + pg_kicker("Vereinsprognose / Monat") + "<div class=\"pg-row\" style=\"margin-top:" + pg(4) + ";\">";
for (const auto &[label, key] : std::array<std::pair<const char *, const char *>, 3>{{{"Einnahmen", "income"}, {"Ausgaben", "expenses"}, {"Saldo", "balance"}}}) {
const auto value = view.at(key).get<int64_t>();
out += "<div class=\"pg-grow\"><span class=\"pg-mut\" style=\"display:block;\">" + std::string(label) + "</span><strong class=\"pg-h" + std::string(std::string(key) == "balance" ? (value >= 0 ? " ad-plus" : " ad-minus") : "") + "\">" +
esc((std::string(key) == "balance" && value > 0 ? "+ " : "") + ad_cash(value)) + "</strong></div>";
}
out += "</div></div></div><div class=\"ad-tiles\">";
// the five pictures: the pointer shows what stands there, a click goes on
const auto tile = [&](const std::string &action, const std::string &id, const std::string &attrs, const std::string &art, const std::string &title, const std::string &kicker, const std::string &value, const std::string &detail, bool selected) {
return btn(action, "<span class=\"ad-tile-art\">" + img(art, 520, 459, false, true, 1100) + "</span><span class=\"ad-tile-over\"><span class=\"ad-tile-k\">" + esc(pg_upper(kicker)) + "</span><strong>" + esc(value) + "</strong><span class=\"ad-tile-d\">" + esc(detail) +
"</span></span><span class=\"ad-tile-cap\"><span>" + esc(title) + "</span></span>",
std::string("ad-tile") + (selected ? " selected" : ""), "id=\"" + id + "\" " + attrs + " aria-label=\"" + esc(title + ": " + value + (detail.empty() ? "" : ", " + detail)) + "\"");
// The menu has two pages: the contracts with sponsors, and what the club invests itself.
const bool investing = advertising_page_ == "investments";
page_title_ = investing ? "Investitionen" : "Werbung";
const auto forecast = [&] {
std::string row = pg_kicker("Vereinsprognose / Monat") + "<div class=\"pg-row\" style=\"margin-top:" + pg(4) + ";\">";
for (const auto &[label, key] : std::array<std::pair<const char *, const char *>, 3>{{{"Einnahmen", "income"}, {"Ausgaben", "expenses"}, {"Saldo", "balance"}}}) {
const auto value = view.at(key).get<int64_t>();
row += "<div class=\"pg-grow\"><span class=\"pg-mut\" style=\"display:block;\">" + std::string(label) + "</span><strong class=\"pg-h" + std::string(std::string(key) == "balance" ? (value >= 0 ? " ad-plus" : " ad-minus") : "") + "\">" +
esc((std::string(key) == "balance" && value > 0 ? "+ " : "") + ad_cash(value)) + "</strong></div>";
}
return row + "</div>";
};
for (const auto &[slot, art, title] : std::array<std::tuple<int, const char *, const char *>, 2>{{{14, "advertising.scene.shirt", "Trikotwerbung"}, {15, "advertising.scene.tv", "TV-Rechte"}}}) {
const auto &c = slots[size_t(slot)];
const bool on = c.at("active") == true;
out += tile("ad-contract", "ad-contract-" + std::to_string(slot), "data-ad-contract=\"" + std::to_string(slot) + "\" data-id=\"" + std::to_string(slot) + "\" aria-pressed=\"" + (advertising_selected_ == slot ? "true" : "false") + "\"", art, title,
on ? (slot == 14 ? "Aktueller Sponsor" : "Aktueller Sender") : "Platz frei", on ? c.at("name").get<std::string>() : std::string("Kein Vertrag"), on ? terms(c) : std::string("Anklicken für Angebote"), advertising_selected_ == slot);
}
static constexpr std::array<const char *, 3> spending_art{"advertising.scene.merchandise", "advertising.scene.press", "advertising.scene.fans"};
// A picture one can click: the pointer shows what stands there today. `shape` is "", "wide"
// or "big"; `amount` stands beside the title where the picture is large enough for it.
const auto tile = [&](const std::string &action, const std::string &id, const std::string &attrs, const std::string &art, const std::string &title, const std::string &kicker, const std::string &value, const std::string &detail, bool selected,
const std::string &shape = std::string(), const std::string &amount = std::string()) {
const double w = shape == "big" ? 921 : shape == "wide" ? 1056 : 520, h = shape == "big" ? 690 : 459;
return btn(action, "<span class=\"ad-tile-art\">" + img(art, w, h, false, true, shape.empty() ? 1100 : 1600) + "</span><span class=\"ad-tile-over\"><span class=\"ad-tile-k\">" + esc(pg_upper(kicker)) + "</span><strong>" + esc(value) + "</strong><span class=\"ad-tile-d\">" + esc(detail) +
"</span></span><span class=\"ad-tile-cap\"><span>" + esc(title) + "</span>" + (amount.empty() ? std::string() : "<strong>" + esc(amount) + "</strong>") + "</span>",
std::string("ad-tile") + (shape.empty() ? "" : " " + shape) + (selected ? " selected" : ""), "id=\"" + id + "\" " + attrs + " aria-label=\"" + esc(title + ": " + value + (detail.empty() ? "" : ", " + detail)) + "\"");
};
// what the game does not know yet is shown, and says so
const std::string soon = "disabled=\"disabled\" aria-disabled=\"true\"";
std::string delivery;
for (int i = 0; i < 3; ++i) {
const auto &row = view.at("spending")[size_t(i)];
const int weeks = row.value("delivery_weeks", 0);
if (i == 0 && weeks > 0) delivery = "Fanartikel: Die Lieferung läuft noch " + std::to_string(weeks) + (weeks == 1 ? " Woche." : " Wochen.");
out += tile("ad-spending", "ad-spending-" + std::to_string(i), "data-ad-spending=\"" + std::to_string(i) + "\" data-id=\"" + std::to_string(i) + "\"", spending_art[size_t(i)], row.at("name").get<std::string>(), i == 0 ? "Bestellung" : "Monatsbudget",
ad_cash(row.at("amount").get<int64_t>()), i == 0 && weeks > 0 ? "Lieferung läuft noch" : "Anklicken zum Ändern", false);
if (const int weeks = view.at("spending")[0].value("delivery_weeks", 0); weeks > 0) delivery = "Fanartikel: Die Lieferung läuft noch " + std::to_string(weeks) + (weeks == 1 ? " Woche." : " Wochen.");
std::string out = "<section class=\"pg-page\" id=\"ad-underlay\"><div class=\"pg-row pg-grow\" style=\"align-items:stretch;\">";
if (investing) {
page_hint_ = "Wohin der Verein sein Geld steckt";
static constexpr std::array<const char *, 3> spending_art{"advertising.scene.merchandise", "advertising.scene.press", "advertising.scene.fans"};
std::string rows;
out += "<div class=\"ad-tiles wide\">";
for (int i = 0; i < 3; ++i) {
const auto &row = view.at("spending")[size_t(i)];
const bool waiting = i == 0 && !delivery.empty();
const auto amount = ad_cash(row.at("amount").get<int64_t>());
out += tile("ad-spending", "ad-spending-" + std::to_string(i), "data-ad-spending=\"" + std::to_string(i) + "\" data-id=\"" + std::to_string(i) + "\"", spending_art[size_t(i)], row.at("name").get<std::string>(), i == 0 ? "Bestellung" : "Monatsbudget", amount,
waiting ? "Die Lieferung läuft noch" : "Anklicken zum Ändern", false, "big", amount);
rows += "<div class=\"pg-kv\"><span>" + esc(row.at("name").get<std::string>()) + "</span><strong>" + esc(amount) + (i == 0 ? "" : " / Monat") + "</strong></div>";
}
out += tile("ad-soon", "ad-spending-international", soon, "investment.scene.international", "Internationale Vermarktung", "Neu", "Noch nicht im Spiel", "Diese Investition folgt", false, "big", "—") + "</div><div class=\"pg-col pg-grow\"><div class=\"pg-panel pg-col\" style=\"" +
pg_css("gap:4px;") + "\">" + pg_kicker("Investitionen") + rows + "<div class=\"pg-kv\"><span>Internationale Vermarktung</span><strong class=\"pg-mut\">folgt</strong></div>" +
(delivery.empty() ? std::string() : "<span class=\"pg-tag accent\" style=\"align-self:flex-start;margin-top:" + pg(6) + ";\">" + esc(delivery) + "</span>") + "</div><div class=\"pg-panel pg-col\" style=\"" + pg_css("gap:4px;") + "\">" + pg_kicker("Vereinsprognose / Monat") + "<div class=\"pg-kv\"><span>Einnahmen</span><strong>" + esc(ad_cash(view.at("income").get<int64_t>())) +
"</strong></div><div class=\"pg-kv\"><span>Ausgaben</span><strong>" + esc(ad_cash(view.at("expenses").get<int64_t>())) + "</strong></div><div class=\"pg-kv\"><span>Saldo</span><strong class=\"" + (view.at("balance").get<int64_t>() >= 0 ? "ad-plus" : "ad-minus") + "\">" +
esc((view.at("balance").get<int64_t>() > 0 ? "+ " : "") + ad_cash(view.at("balance").get<int64_t>())) + "</strong></div></div><span class=\"pg-sp\"></span><span class=\"pg-mut ad-help\">Der Mauszeiger auf einem Bild zeigt den aktuellen Stand, ein Klick öffnet das Zahlenfeld. Fanartikel werden bestellt und geliefert; Öffentlichkeitsarbeit und Fanbetreuung sind Budgets je Monat.</span></div>";
} else {
out += "<div class=\"pg-col\" style=\"width:" + pg(ad_ground_w) + ";flex:none;\"><div class=\"ad-ground\" role=\"group\" aria-label=\"Vierzehn Werbebanden\">" +
picture(renderer_.diagram("advertising-ground", ad_ground_svg(taken, advertising_selected_ >= 0 && advertising_selected_ < 14 ? advertising_selected_ : -1), 2400), ad_ground_w * 2.25, ad_ground_h * 2.25);
for (int i = 0; i < 14; ++i) {
const auto &c = slots[size_t(i)];
const auto b = ad_board(i);
const bool on = taken[size_t(i)];
const auto name = c.at("name").get<std::string>();
// the boards at the ends are read from the pitch: their writing stands upright
const std::string face = "<span class=\"ad-board-face" + std::string(b.turn > 0 ? " right" : b.turn < 0 ? " left" : "") + "\" style=\"" + (b.turn ? "left:" + pg((b.w - b.h) / 2) + ";top:" + pg((b.h - b.w) / 2) + ";width:" + pg(b.h) + ";height:" + pg(b.w) + ";" : std::string()) +
"\"><span class=\"ad-board-no\">BANDE " + std::to_string(i + 1) + "</span><strong class=\"" + (on ? "" : "free") + "\">" + esc(on ? name : "Platz frei") + "</strong></span>";
out += btn("ad-contract", face, std::string("ad-board") + (on ? " on" : "") + (advertising_selected_ == i ? " selected" : ""),
"id=\"ad-contract-" + std::to_string(i) + "\" data-ad-contract=\"" + std::to_string(i) + "\" data-id=\"" + std::to_string(i) + "\" aria-pressed=\"" + (advertising_selected_ == i ? "true" : "false") + "\" aria-label=\"Bande " + std::to_string(i + 1) + ", " +
esc(on ? name + ", " + terms(c) : std::string("Platz frei")) + "\" title=\"" + esc(on ? name + " · " + terms(c) : std::string("Platz frei · anklicken für Angebote")) + "\" style=\"left:" + pg(b.x) + ";top:" + pg(b.y) + ";width:" + pg(b.w) + ";height:" + pg(b.h) + ";\"");
}
out += "</div><div class=\"pg-panel ad-forecast\">" + forecast() + "</div></div><div class=\"ad-tiles\">";
for (const auto &[slot, art, title] : std::array<std::tuple<int, const char *, const char *>, 2>{{{14, "advertising.scene.shirt", "Trikotwerbung"}, {15, "advertising.scene.tv", "TV-Rechte"}}}) {
const auto &c = slots[size_t(slot)];
const bool on = c.at("active") == true;
out += tile("ad-contract", "ad-contract-" + std::to_string(slot), "data-ad-contract=\"" + std::to_string(slot) + "\" data-id=\"" + std::to_string(slot) + "\" aria-pressed=\"" + (advertising_selected_ == slot ? "true" : "false") + "\"", art, title,
on ? (slot == 14 ? "Aktueller Sponsor" : "Aktueller Sender") : "Platz frei", on ? c.at("name").get<std::string>() : std::string("Kein Vertrag"), on ? terms(c) : std::string("Anklicken für Angebote"), advertising_selected_ == slot);
}
out += tile("ad-soon", "ad-contract-naming", soon, "advertising.scene.arena", "Namensrecht Stadion", "Neu", "Noch nicht im Spiel", "Dieser Vertrag folgt", false, "wide") +
"<div class=\"pg-panel ad-note wide\"><strong class=\"pg-h\" style=\"font-size:" + pg(18) + ";line-height:" + pg(23) + ";\">Werbung</strong><span class=\"pg-mut\">Der Mauszeiger auf einem Bild zeigt den aktuellen Vertrag. Ein Klick auf eine Bande, das Trikot oder die Kamera blättert durch die Angebote. Fanartikel, Öffentlichkeitsarbeit und Fanbetreuung stehen unter Investitionen.</span>" +
"<span class=\"pg-sp\"></span><div class=\"pg-row\" style=\"justify-content:flex-end;\">" + btn(engine_mode_ ? std::string("engine-open") : std::string("open:investments"), "<span>Zu den Investitionen ›</span>", "pg-btn", "id=\"ad-to-investments\" data-id=\"investments\"") + "</div></div></div>";
}
out += "<div class=\"pg-panel ad-note\"><strong class=\"pg-h\" style=\"font-size:" + pg(18) + ";line-height:" + pg(23) + ";\">Werbung und Vereinsausgaben</strong><span class=\"pg-mut\">Der Mauszeiger auf einem Bild zeigt den aktuellen Stand. Ein Klick auf eine Bande, das Trikot oder die Kamera blättert durch die Angebote; die drei Ausgaben öffnen das Zahlenfeld.</span>" +
(delivery.empty() ? std::string() : "<span class=\"pg-tag accent\" style=\"align-self:flex-start;\">" + esc(delivery) + "</span>") + "</div></div></div></section>";
out += "</div></section>";
if (advertising_selected_ < 0 || advertising_selected_ > 15) return out;
// the offers for the chosen place, as a note
const auto &choices = engine_mode_ ? slots[size_t(advertising_selected_)].at("choices") : Json::array();
+4
View File
@@ -702,6 +702,9 @@ void App::dispatch(const std::string &action, Rml::Element *target) {
// the surroundings are the second page of the stadium
const bool surroundings = route == "periphery";
if (surroundings) route = "stadium";
// the investments are the second page of advertising
const bool investments = route == "investments";
if (investments) route = "advertising";
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;
@@ -717,6 +720,7 @@ void App::dispatch(const std::string &action, Rml::Element *target) {
return;
}
if (route == "bank") { bank_view_ = "entrance"; bank_hint_.clear(); }
if (route == "advertising") { advertising_page_ = investments ? "investments" : "advertising"; advertising_selected_ = -1; advertising_offer_ = 0; }
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();
+1 -1
View File
@@ -480,7 +480,7 @@ void App::engine_event(Rml::Event &event) {
const auto price = engine_ticket_projection(engine_data_);
ticket_->open(node, device_ratio_, price.at("min"), price.at("max")); dirty_ = true;
}
else if (action == "engine-open" && (id == "environment" || id == "advertising")) { menu_ = id; advertising_selected_ = -1; advertising_offer_ = 0; refresh(); }
else if (action == "engine-open" && (id == "environment" || id == "advertising" || id == "investments")) { menu_ = id == "investments" ? "advertising" : id; advertising_page_ = id == "investments" ? "investments" : "advertising"; advertising_selected_ = -1; advertising_offer_ = 0; refresh(); }
else if(action=="engine-open"&&id=="newplayer"){menu_=id;scene_="managerhub";career_resign_open_=career_game_end_=false;engine_manager_context_=engine_data_.at("desktop").at("meta");focus_after_render_="career-add";refresh();}
else if(action=="engine-open"&&id=="settings"){reset_settings();menu_=id;refresh();}
else if(action=="engine-open"&&id=="indoor"){menu_=id;engine_reports_sync();refresh();}
+6 -3
View File
@@ -14,7 +14,7 @@ const std::vector<NotebookSection> &notebook_sections() {
{"home", "Hauptseite", {}},
{"team", "Mannschaft", {"lineup", "tactics", "training", "camp", "strengths", "scorers"}},
{"transfers", "Transfers", {"transfer", "contracts"}},
{"club", "Verein", {"stadium", "periphery", "environment", "advertising"}},
{"club", "Verein", {"stadium", "periphery", "environment", "advertising", "investments"}},
{"finance", "Finanzen", {"balance", "bank", "toto"}},
{"fixtures", "Spielplan", {"calendar", "league", "tables", "other", "friendlies", "postpone", "indoor"}},
{"records", "Statistik", {"statistics", "stat-trend", "stat-winners", "stat-records", "stat-players", "achievements", "almanac", "fairplay", "highscore"}},
@@ -26,7 +26,7 @@ std::string notebook_page_label(const std::string &route) {
static const std::map<std::string, std::string> labels = {
{"lineup", "Aufstellung"}, {"tactics", "Taktik"}, {"training", "Training"}, {"camp", "Trainingslager"}, {"strengths", "Stärken"},
{"scorers", "Spielerstatistik"}, {"transfer", "Transfermarkt"}, {"contracts", "Verträge"}, {"stadium", "Stadion"}, {"periphery", "Peripherie"}, {"environment", "Umfeld"},
{"advertising", "Werbung"}, {"balance", "Bilanz"}, {"bank", "Bank"}, {"toto", "Toto"}, {"calendar", "Kalender"}, {"league", "Ligaspiele"},
{"advertising", "Werbung"}, {"investments", "Investitionen"}, {"balance", "Bilanz"}, {"bank", "Bank"}, {"toto", "Toto"}, {"calendar", "Kalender"}, {"league", "Ligaspiele"},
{"tables", "Tabellen"}, {"other", "Übrige Spiele"}, {"friendlies", "Testspiele"}, {"postpone", "Verlegen"}, {"indoor", "Halle"},
{"statistics", "Analyse"}, {"stat-trend", "Verlauf"}, {"stat-winners", "Sieger"}, {"stat-records", "Rekorde"}, {"stat-players", "Spieler"}, {"achievements", "Erfolge"}, {"almanac", "Almanach"}, {"fairplay", "Fairplay"}, {"highscore", "Highscore"},
{"news", "Nachrichten"}, {"settings", "Einstellungen"}, {"save", "Speichern"}, {"load", "Laden"}, {"newplayer", "Manager"}};
@@ -203,7 +203,10 @@ std::string App::notebook_shell(const std::function<bool(const std::string &)> &
if (!engine_mode_ && std::string_view(r).starts_with("stat-")) continue;
// the ground is one menu with two pages: the stadium and what stands around it
const bool ground = std::string_view(r) == "stadium" || std::string_view(r) == "periphery";
// so is advertising: the sponsors' contracts, and what the club invests itself
const bool commerce = std::string_view(r) == "advertising" || std::string_view(r) == "investments";
const bool here = ground ? menu_ == "stadium" && (stadium_view_.value("view", std::string("inside")) == "panorama") == (std::string_view(r) == "periphery")
: commerce ? menu_ == "advertising" && (advertising_page_ == "investments") == (std::string_view(r) == "investments")
: part && engine_mode_ ? menu_ == "statistics" && statistics_page_ == r : notebook_menu() == r;
if (here) {
kicker = std::string(section.label) + " · " + std::to_string(n + 1) + " / " + std::to_string(section.routes.size());
@@ -213,7 +216,7 @@ std::string App::notebook_shell(const std::function<bool(const std::string &)> &
std::string("nb-sub") + (here ? " active" : ""),
"id=\"page-" + std::string(r) + "\" aria-pressed=\"" + (here ? "true" : "false") + "\" style=\"transform:translateY(" + (here ? std::string("-13") : std::to_string(sub_rest[n % sub_rest.size()])) + "dp) rotate(" +
scalar(sub_turns[n % sub_turns.size()]) + "deg);\"",
enabled(part ? "statistics" : ground ? "stadium" : r));
enabled(part ? "statistics" : ground ? "stadium" : commerce ? "advertising" : r));
++n;
}
}
+1
View File
@@ -485,6 +485,7 @@ class App final : public Rml::EventListener {
uint64_t contracts_revision_ = 0;
std::shared_ptr<const Catalog> contracts_world_;
int advertising_selected_ = -1, advertising_offer_ = 0;
std::string advertising_page_ = "advertising"; // or "investments": the second page of the menu
uint64_t advertising_revision_ = 0;
std::shared_ptr<const Catalog> advertising_world_;
int toto_column_ = 0;