// SPDX-License-Identifier: GPL-3.0-only // Included in the native UI implementation's anonymous namespace. void App::init_desktop() { if (!desktop_.contains("objects")) { desktop_ = default_desktop(); saved_desktop_ = desktop_; } } std::string App::widget(const std::string &id, const Json &o) { const auto s = snap(); const auto *own = club(s); const auto w = o.value("w", 472), h = o.value("h", 472); const auto row = world_->clubs(own ? own->value("competition", "") : league_); const auto *opponent = row.size() > 1 ? (row[0] == own ? row[1] : row[0]) : own; auto heading = [&](const std::string &name) { return "
" + esc(name) + "
"; }; if (id == "calendar") { const auto date = s.state.value("date", std::string("2026-07-01")); const auto year = date.substr(0, 4), day = date.substr(8, 2); const int month = std::stoi(date.substr(5, 2)); const std::array months = { "Januar", "Februar", "März", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember"}; return "
" + std::string(months[size_t(std::clamp(month, 1, 12) - 1)]) + " " + year + "

Saisonvorbereitung

" + std::to_string(std::stoi(day)) + "

" + esc(date) + "

" + btn("open:calendar", glyph("calendar", 32) + "Kalender öffnen" + glyph("arrow-diagonal", 30) + "", "card-button calendar-link", "style=\"left:0;bottom:0;width:100%;height:90dp;border-top:2dp " "var(--border);font-size:25dp;color:var(--muted);\""); } if (id == "account") { if (h < 300) return "
Konto

" + cash(s.state.value("cash", int64_t(0))) + "

" + btn("ticket", "Eintritt   " + std::to_string(s.state.value("ticket", 13)) + " €", "card-button", "id=\"desktop-ticket\" data-interactive=\"true\" " "style=\"right:20dp;top:45dp;font-size:32dp;\""); return heading("Vereinskasse") + "

Guthaben

" + cash(s.state.value("cash", int64_t(0))) + "

Sparbuch

" + cash(s.state.value("deposit", int64_t(0))) + "

" + btn("ticket", "Eintritt
" + std::to_string(s.state.value("ticket", 13)) + " €   ›", "card-button", "id=\"desktop-ticket\" data-interactive=\"true\" " "style=\"right:30dp;bottom:20dp;min-width:200dp;padding:12dp " "24dp;font-size:34dp;background-color:var(--soft);border-radius:" "18dp;\""); } if (id == "portrait") return img(std::string(manager(s).value("portrait_style", "photo") == "painted" ? "manager-painted." : "manager.") + std::to_string(manager(s).value("portrait", 0)), w, h, false, true, 800) + "
Manager

" + esc(manager(s).value("name", "")) + "

"; if (id == "crest" || id == "opponent-crest") return "
" + crest(id == "crest" ? own : opponent, std::min(w - 60, h - 150)) + "

" + (id == "crest" ? "Dein Verein" : "Nächster Gegner") + "

" + esc(world_->name(*(id == "crest" ? own : opponent))) + "

"; if (id == "competition") return heading("Nächste Begegnung") + "
" + crest(own, 80) + "

" + esc(own ? world_->name(*own) : "") + "

Freundschaftsspiel

19:00

Heim · " "Samstag

" + crest(opponent, 80) + "

" + esc(opponent ? world_->name(*opponent) : "") + "

"; if (id == "warnings") { const std::array names = { "Aktiengewinn", "Kontostand", "Freie Werbeflächen", "Sondertraining", "Erschöpfung", "Startaufstellung", "Ersatzspieler", "Taktischer Einsatz", "Auslaufende Verträge", "Lizenz"}; const std::array icons = { "chart", "coins", "shirt", "star", "heart", "person", "person", "chart", "save", "check"}; const std::array wide_members = {0, 1, 2, 3, 5, 7, 8, 9}; const bool wide = h < 300; const int columns = wide ? 8 : 5, count = wide ? 8 : 10; std::string out = heading("Vereinsstatus"); for (int i = 0; i < count; ++i) { const int member = wide ? wide_members[size_t(i)] : i; const int cell_w = (w - 52) / columns; const int x = 26 + cell_w * (i % columns), y = wide ? 90 : 95 + (i / columns) * 175; out += "
" + glyph(icons[size_t(member)], 36) + "
" + (wide ? "" : "

" + std::string(names[size_t(member)]) + "

") + "
"; } return out; } if (id == "trash") return "
" + glyph("trash", 100) + "

Papierkorb

"; if (id == "fans") return heading("Fan-Stimmung") + "

" + std::to_string(s.state.value("fans", 67)) + " %

"; if (id == "news") return heading("Nachrichten") + "

Willkommen zur " "neuen Saison.

"; if (id == "results") return heading("Letzte sechs Spiele") + "
––––––
"; if (id == "own-summary" || id == "opponent-summary") return heading(id == "own-summary" ? "Platz & Stärke · eigener Verein" : "Platz & Stärke · Gegner") + "
––
"; const auto caption = id == "duels" ? "Direkter Vergleich" : id == "comparison-curve" ? "Tabellenplätze · Vergleich" : id == "own-curve" ? "Tabellenplatz · eigener Verein" : "Tabellenplatz · Gegner"; return heading(caption) + "

Saisonvorbereitung

"; } std::string App::render_desktop() { init_desktop(); const auto s = snap(); const auto *c = club(s); std::string out = "
" + btn("desktop-context", crest(c, 82) + "" + esc(c ? world_->name(*c) : "") + "" + esc(manager(s).value("name", "")) + "", "identity") + "
Saisonvorbereitung" + esc(s.state.value("date", std::string())) + "
Guthaben" + cash(s.state.value("cash", int64_t(0))) + "
"; for (const auto &[id, o] : desktop_["objects"].items()) { if (!o.value("visible", false)) continue; const auto style = rect(o.value("x", 0), o.value("y", 0), o.value("w", 224), o.value("h", 224)); if (o.value("widget", false)) out += "
" + widget(id, o) + (o.value("pinned", true) ? "
" : "") + "
"; else { const auto route = id.substr(4); const std::array colors = { "#3d789b", "#375a83", "#477c73", "#42846b", "#a58a49", "#586ba0", "#517d71", "#668a98", "#af6860", "#6b809c", "#657cb3", "#507b9c", "#559b76", "#a7474e", "#967d50", "#648f91", "#54856b", "#558f93", "#6379a3", "#788598", "#8d7856", "#a66d64", "#748474", "#6887a2", "#6b9270", "#7c8b9c", "#ac8b52", "#7783a4", "#648f83", "#927d9d", "#ac5e63", "#806c98"}; const auto i = std::find(routes.begin(), routes.end(), route); const auto color = colors[size_t(i - routes.begin())]; const auto top = theme_ == "matchday" ? mixed_color(color, "#27282e", .55) : mixed_color(color, "#c5ddf1", .1); const auto bottom = theme_ == "matchday" ? "#272a30" : mixed_color(color, "#07111e", .38); out += ""; } } return out; } std::string App::render_newgame() { std::string body = "

Grundeinstellungen

Zuerst die " "Partie, dann die Manager.

"; const std::array keys = {"duration", "difficulty", "players", "mode"}; const std::array names = {"Spieldauer", "Schwierigkeit", "Mitspieler", "Modus"}; const std::array limits = { 5, 10, start_options_.value("league", true) ? 4 : 1, 3}; for (int i = 0; i < 4; ++i) { const auto key = std::string(keys[size_t(i)]); const int value = start_options_.value(key, 1), x = (i % 2) * 1320, y = 120 + (i / 2) * 716; std::string symbols, caption; if (i == 0) { symbols = "" + std::string(value == 5 ? "∞" : std::to_string(value)) + ""; caption = value == 5 ? "Unbegrenzt" : value == 1 ? "Saison" : "Saisons"; } else if (i == 1) { symbols = "
"; const int cols = std::min(value, 5); for (int n = 0; n < value; ++n) symbols += "
" + glyph("ball", 92) + "
"; symbols += "
"; caption = "Spielstärke " + std::to_string(value) + " von 10"; } else if (i == 2) { symbols = "
"; for (int n = 0; n < value; ++n) symbols += glyph("person", 110); symbols += "
"; caption = std::to_string(value) + " Mitspieler"; } else { symbols = "" + std::string(value == 1 ? "I" : value == 2 ? "II" : "III") + ""; caption = value == 1 ? "Grundfunktionen" : value == 2 ? "Erweiterte Funktionen" : "Alle Funktionen"; } body += "

" + names[size_t(i)] + "

"; body += btn("setup-step", "−", {}, "data-id=\"" + key + "\" data-step=\"-1\" " "style=\"width:94dp;height:124dp;padding:0;font-size:72dp;\" " + (value == 1 ? "disabled" : "")); body += "
" + symbols + "

" + caption + "

"; body += btn("setup-step", "+", {}, "data-id=\"" + key + "\" data-step=\"1\" " "style=\"width:94dp;height:124dp;padding:0;font-size:72dp;\" " + (value == limits[size_t(i)] ? "disabled" : "")) + "
"; } body += "
"; for (const auto *key : {"league", "world"}) { const bool league = std::string(key) == "league", active = start_options_.value(key, true), locked = active && (league ? (start_options_.value("players", 1) > 1 || !start_options_.value("world", true)) : !start_options_.value("league", true)); body += btn("setup-competition", glyph(league ? "pitch" : "world", 70) + "" + (league ? "Ligaspiel" : "WM / EM") + "   " + (active ? "Aktiv" : "Aus") + "", active ? "primary row" : "row", "data-id=\"" + std::string(key) + "\" style=\"flex:1;height:126dp;justify-content:center;\" " + (locked ? "disabled" : "")); } body += "

Mindestens " "ein Wettbewerb bleibt aktiv.

" + btn("close", "Abbrechen") + btn("setup-next", "Weiter", "primary") + "
"; return window("Neues Spiel", body); } std::string App::render_manager() { const int limit = adding_manager_ ? 4 : start_options_.value("players", 1); const auto used_club = [&](const std::string &id) { return std::any_of( managers_draft_.begin(), managers_draft_.end(), [&](const auto &m) { return m.value("club", "") == id; }); }; const auto used_portrait = [&](int id) { return std::any_of( managers_draft_.begin(), managers_draft_.end(), [&](const auto &m) { return m.value("portrait", 0) == id; }); }; const int portrait = selections_["portrait"].empty() ? 0 : std::stoi(selections_["portrait"]); const auto style = selections_["portrait-style"] == "painted" ? "manager-painted." : "manager."; if (!world_->manageable(selected_club_) || used_club(selected_club_)) for (auto *c : world_->clubs()) if (world_->manageable(c->value("id", "")) && !used_club(c->value("id", ""))) { selected_club_ = c->value("id", ""); break; } std::string body; std::vector> countries; std::set seen; for (auto *r : world_->leagues()) { const auto id = r->value("nation", ""); if (seen.insert(id).second) countries.emplace_back(id, world_->nation_name(id)); } auto leagues = world_->leagues(country_); if (std::none_of(leagues.begin(), leagues.end(), [&](auto *r) { return r->value("id", "") == league_; })) league_ = leagues.empty() ? "" : leagues.front()->value("id", ""); std::vector> choices; for (auto *r : leagues) choices.emplace_back(r->value("id", ""), world_->name(*r)); if (manager_picker_) { body = "

Verein auswählen

" + btn("manager-clubs-back", "Zurück") + "
" + select("manager-country", countries, country_, "manager-country") + select("manager-league", choices, league_, "manager-league") + "
"; const auto clubs = world_->clubs(league_); for (size_t i = 0; i < clubs.size(); ++i) { const auto *c = clubs[i]; const auto id = c->value("id", ""); const bool locked = !world_->manageable(id), used = used_club(id); const auto x = (i % 4) * 650, y = (i / 4) * 340; body += ""; } return window("Neuer Spieler", body + "
"); } const auto *c = world_->find("clubs", selected_club_); body = "

Mitspieler " + std::to_string(manager_index_ + 1) + " von " + std::to_string(limit) + "

Dein Name. Dein " "Verein. Dein Porträt.

"; body += "

So wirst du im Spiel " "angesprochen.

Porträt " + std::to_string(portrait + 1) + "

" + img(style + std::to_string(portrait), 174, 232, false, true, 320) + "
"; body += "

Verein

" + btn("manager-clubs", crest(c, 176) + "
" + esc(c ? world_->name(*c) : "") + "" + esc(c ? world_->name(*world_->find( "competitions", c->value("competition", ""))) : "") + "Verein wählen ›
", "row", "style=\"margin-top:10dp;width:100%;height:230dp;background-" "color:transparent;border-width:0;padding:0;text-align:left;\"") + "
"; body += "

Startliga

" + select("manager-country", countries, country_, "manager-country") + select("manager-league", choices, league_, "manager-league") + "

Vereinsstärke

" + select("manager-strength", {{"0", "Unteres Drittel"}, {"1", "Mittelfeld"}, {"2", "Oberes Drittel"}}, selections_["manager-strength"].empty() ? "1" : selections_["manager-strength"], "manager-strength") + "
"; body += "

Managerporträt

" + btn("portrait-style", "Foto", selections_["portrait-style"] != "painted" ? "primary" : "", "data-id=\"photo\"") + btn("portrait-style", "Illustration", selections_["portrait-style"] == "painted" ? "primary" : "", "data-id=\"painted\"") + "
"; for (int i = 0; i < 12; ++i) { const int x = 26 + (i % 6) * 320, y = 100 + (i / 6) * 440; const bool used = used_portrait(i); body += ""; } body += "

Mitspieler dieser Partie

"; for (size_t i = 0; i < managers_draft_.size(); ++i) { const auto &m = managers_draft_[i]; body += "
" + img("manager." + std::to_string(m.value("portrait", 0)), 90, 120, false, true, 180) + "
Spieler " + std::to_string(i + 1) + "

" + esc(m.value("name", "")) + "

" + esc(world_->name(*world_->find("clubs", m.value("club", "")))) + "
"; } body += "

" + std::to_string(limit - int(managers_draft_.size())) + " weitere Plätze frei

" + btn("manager-back", adding_manager_ ? "Abbrechen" : "Zurück") + btn("manager-next", adding_manager_ ? "Mitspieler hinzufügen" : manager_index_ + 1 == limit ? "Spiel starten" : "Mitspieler bestätigen", "primary", world_->manageable(selected_club_) && manager_index_ < limit ? "" : "disabled") + "
"; return window("Neuer Spieler", body); } std::string App::render_opening() { const std::array names = {"UEFA-Cup", "Champions League", "Europapokal der Pokalsieger"}; const auto german = world_->clubs("comp:de-1"); std::vector pool; for (auto *l : world_->leagues("nation:de")) for (auto *c : world_->clubs(l->value("id", ""))) if (pool.size() < 64) pool.push_back(c); std::string body; if (opening_page_ < 3) { body = "

" + std::string(names[size_t(opening_page_)]) + "

Deutsche Teams " "· Saison " + esc(snap().state.value("date", std::string()).substr(0, 4)) + "

"; const int count = opening_page_ == 0 ? 4 : 1; for (int i = 0; i < count && size_t(i) < german.size(); ++i) { const auto *c = german[size_t((i + opening_page_) % int(german.size()))]; const bool single = count == 1; const int x = single ? 704 : 150 + (i % 2) * 1178, y = single ? 360 : 180 + (i / 2) * 730; body += "
" + crest(c, single ? 620 : 360) + "

" + esc(world_->name(*c)) + "

"; } body += "
" + btn("opening-next", "Weiter", "primary", "style=\"flex:none;width:390dp;\"") + "
"; } else { const auto pair = [&](int index, int known, int size) { const size_t a = size_t(index * 2), b = a + 1; if (b >= pool.size()) return std::string(); const auto label_for = [&](const Json *c, bool home, bool visible) { const auto text = "" + (visible ? esc(world_->name(*c)) : home ? "Heim" : "Noch nicht gezogen") + ""; const auto logo = visible ? crest(c, size) : ""; return "" + (home ? text + logo : logo + text) + ""; }; return "
" + std::to_string(index + 1) + "" + label_for(pool[a], true, known > 0) + "–" + label_for(pool[b], false, known > 1) + "
"; }; body = "

" + std::string(opening_page_ == 3 ? "1. Runde" : "DFB-Pokal") + "

" + (opening_page_ == 3 ? "DFB-Pokal · Saison " : "1. Runde · Saison ") + esc(snap().state.value("date", std::string()).substr(0, 4)) + "

"; if (opening_page_ == 3) { body += "" + std::to_string(draw_revealed_) + " / 64 Mannschaften
" + img("art.cup-draw-v1.png", 2608, 850, false, false, 1800) + "
"; const int current = std::max(0, (draw_revealed_ - 1) / 2), known = draw_revealed_ ? draw_revealed_ - current * 2 : 0; body += "
" + pair(current, known, 66) + "
"; for (int i = std::max(0, current - 3); i < current; ++i) body += "
" + pair(i, 2, 42) + "
"; body += "
" + btn("opening-play", draw_playing_ ? "Pause" : "Fortsetzen", {}, "style=\"flex:none;width:390dp;\"") + btn("opening-all", "Alle Paarungen anzeigen", {}, "style=\"flex:none;width:600dp;\"") + "
"; } else { for (int column = 0; column < 2; ++column) { body += "
"; for (int row = 0; row < 16; ++row) body += "
" + pair(column * 16 + row, 2, 36) + "
"; body += "
"; } body += "
" + btn("opening-finish", "Weiter zum Desktop", "primary", "style=\"flex:none;width:550dp;\"") + "
"; } } return window(opening_page_ < 3 ? "Deutsche Teams" : "DFB-Pokal", body, false); } std::string App::render_camp() { const auto index_file = Json::parse(editor::read_file(gui_.root() / "gui-assets.json")); const auto demo = index_file.at("demo"), camps = demo.at("training_camps"); const auto s = snap(); const auto id = s.state.at("camp").value("selected", std::string("resort:4")); const Json *chosen = nullptr; for (const auto &c : camps) if (c.value("id", "") == id) chosen = &c; if (!chosen) chosen = &camps.at(0); auto region = selections_["camp-region"]; if (region.empty()) region = chosen->value("map", "map:eu"); std::string body = "
"; for (const auto &m : demo.at("maps")) body += btn("camp-region", esc(m.value("name", "")), m.value("id", "") == region ? "primary" : "", "data-id=\"" + esc(m.value("id", "")) + "\""); body += "
" + img("map." + region.substr(4), 1440, 1603.2, false, false, 1600); for (const auto &c : camps) if (c.value("map", "") == region) { const double x = c.value("x", 0) * 1.2, y = c.value("y", 0) * 1.2; body += btn("camp-select", "", c.value("id", "") == id ? "primary" : "", "data-id=\"" + esc(c.value("id", "")) + "\" style=\"position:absolute;" + rect(x - 34, y - 34, 68, 68) + "padding:23dp;border-radius:34dp;\""); } body += "
<" "div style=\"height:570dp;overflow:hidden;border-radius:24dp;\">" + img(chosen->value("gui_image", ""), 1100, 570, false, true, 1400) + "

" + esc(chosen->value("name", "")) + "

" + esc(chosen->value("place", "")) + "

"; const std::array qualities = { "Platzqualität", "Fitnessgeräte", "Verpflegung", "Unterkunft"}; for (size_t i = 0; i < 4; ++i) { const int q = chosen->at("quality")[i].get(); std::string stars; for (int j = 0; j < q; ++j) stars += glyph("star", 32); body += "
" + std::string(qualities[i]) + "" + stars + "
"; } body += "
Preis" + cash(chosen->value("price", int64_t(0))) + "
"; const std::array focus = {"Kondition", "Technik", "Spiel", "Erholung"}; const auto values = s.state.at("camp").at("focus"); int sum = 0; for (const auto &v : values) sum += v.get(); for (int i = 0; i < 4; ++i) { const int value = i == 3 ? 15 - sum / 3 : values[size_t(i)].get(); body += "
" + std::to_string(value) + " / 15
"; } body += "
" + btn("camp-remember", "Vormerken", "primary") + "
"; return body; } std::string App::render_settings() { if (draft_preferences_.is_null()) draft_preferences_ = source_ ? snap().state.at("preferences") : Json{{"theme", theme_}, {"volume", 80}, {"effects", true}}; std::string nav; for (const auto &[key, label] : std::vector>{ {"display", "Anzeige"}, {"sound", "Sound"}, {"game", "Spiel"}, {"automation", "Automatik"}}) { if (scene_ == "main" && (key == "game" || key == "automation")) continue; nav += btn("settings-category", label, settings_category_ == key ? "primary" : "", "data-id=\"" + key + "\" " "style=\"display:flex;justify-content:flex-start;width:100%;" "height:100dp;margin-" "bottom:14dp;text-align:left;\""); } std::string pane = "

" + std::string(settings_category_ == "display" ? "Anzeige" : settings_category_ == "sound" ? "Sound" : settings_category_ == "game" ? "Spiel" : "Automatik") + "

"; if (settings_category_ == "display") { pane += "

Gestaltung

"; for (const auto &[id, name] : std::vector>{ {"midnight", "Midnight Glass"}, {"silver", "Silver Glass"}, {"matchday", "Matchday"}}) pane += btn("settings-theme", img("background", 520, 270, false, true, 650) + "

" + name + "

", std::string("choice ") + (draft_preferences_.value("theme", theme_) == id ? "selected" : ""), "data-id=\"" + id + "\" style=\"width:570dp;padding:20dp;\""); pane += "

Bildschirm

" + select("display-mode", {{"window", "Fenster"}, {"fullscreen", "Vollbild"}}, draft_preferences_.value("mode", "window")) + "
" + select("display-resolution", {{"1280x720", "1280 × 720"}, {"1920x1080", "1920 × 1080"}, {"2560x1440", "2560 × 1440"}, {"3840x2160", "3840 × 2160"}}, draft_preferences_.value("resolution", "1920x1080")) + "
" + select("display-scale", {{"auto", "Auto"}, {"1", "1×"}, {"1.5", "1,5×"}, {"2", "2×"}}, draft_preferences_.value("scale", "auto")) + "
"; } else if (settings_category_ == "sound") pane += "
" + std::to_string(draft_preferences_.value("volume", 80)) + " %
" + select("sound-style", {{"classic", "Klassisch"}, {"modern", "Modern"}}, draft_preferences_.value("sound-style", "classic")) + "
"; else if (settings_category_ == "automation") { pane += "
"; for (const auto *name : {"Aufstellung", "Auswechslungen", "Taktik", "Manndeckung", "Training"}) pane += "
"; } else pane += std::string( "
"; return "
" + nav + "
" + pane + "
" + btn("close", "Abbrechen") + btn("settings-apply", "Anwenden", "primary") + "
"; } std::string App::render_save(bool save) { const auto directory = user_dir() / "saves"; std::string body = "
"; if (save) body += btn("save-new", "Neuer Speicherstand", "choice", "style=\"width:100%;text-align:left;min-height:100dp;margin-" "bottom:14dp;\""); if (fs::exists(directory)) for (const auto &file : fs::directory_iterator(directory)) if (file.path().extension() == ".json") { const auto name = editor::utf8(file.path().stem()); body += btn("save-select", esc(name), std::string("choice ") + (selections_["save"] == name ? "selected" : ""), "data-id=\"" + esc(name) + "\" " "style=\"width:100%;min-height:110dp;text-align:left;" "margin-bottom:14dp;\""); } body += "

" + esc(selections_["save"].empty() ? "Speicherstand auswählen" : selections_["save"]) + "

"; const auto s = snap(); body += "
" + crest(club(s), 340) + "
Saison" + esc(s.state.value("date", std::string()).substr(0, 4)) + "
SpieltagSaisonvorbereitung
Datum" + esc(s.state.value("date", std::string())) + "
Mitspieler" + std::to_string(s.state.at("managers").size()) + "
"; if (save && selections_["save"].empty()) body += "
"; return body + "
" + btn("save-delete", "Löschen") + btn("save-rename", "Umbenennen") + btn("close", "Abbrechen") + btn(save ? "save-confirm" : "load-confirm", save ? "Speichern" : "Laden", "primary") + "
"; } std::string App::render_menu(const std::string &key) { std::string body; if (key == "tables" || key == "strengths" || key == "league" || key == "other") body = render_reports(key); else if (key == "almanac") body = render_almanac(); else if (key == "postpone") body = render_postpone(); else if (key == "friendlies") body = render_friendlies(); else if (key == "indoor") body = render_indoor(); else if (key == "lineup") body = render_lineup(); else if (key == "transfer") body = render_transfer(); else if (key == "environment") body = render_environment(); else if (key == "advertising") body = render_advertising(); else if (key == "toto") body = render_toto(); else if (key == "bank") body = render_bank(); else if (key == "balance") body = render_balance(); else if (key == "contracts") body = render_contracts(); else if (key == "training") body = render_training(); else if (key == "tactics") body = render_tactics(); else if (key == "calendar") body = render_calendar(); else if (key == "camp") body = render_camp(); else if (key == "settings") body = render_settings(); else if (key == "save" || key == "load") body = render_save(key == "save"); else if (key == "widgets" || key == "view-save" || key == "view-load" || key == "background") body = render_desktop_tools(key); else throw editor::Error("Diese native Ansicht ist noch nicht verfügbar."); std::string heading = key == "postpone" ? "Spiel verlegen" : title(key); if (key == "bank" && bank_view_ != "entrance") { const std::map labels = {{"savings", "Sparbuch"}, {"properties", "Immobilien"}, {"stocks", "Aktien"}, {"credit", "Kredit"}, {"overview", "Finanzübersicht"}}; if (labels.contains(bank_view_)) heading += " · " + labels.at(bank_view_); } return "
" + window(heading, body) + "
"; }