Port statistics and the news tablet to the Modern UI (by Codex)

This commit is contained in:
Codex committed 2026-10-25 20:10:57 +01:00
1 parent 349c416f3a
commit a45217c362
32 files changed
+2493 -23

No files matched your search

+7 -4
View File
@@ -154,9 +154,7 @@ std::string App::widget(const std::string &id, const Json &o) {
"style=\"font-size:80dp;padding-top:85dp;\">" +
std::to_string(s.state.value("fans", 67)) + " %</p>";
if (id == "news")
return heading("Nachrichten") +
"<p style=\"padding:90dp 30dp;font-size:34dp;\">Willkommen zur "
"neuen Saison.</p>";
return render_news_widget(o);
if (id == "results")
return heading("Letzte sechs Spiele") +
"<div class=\"row\" style=\"padding:100dp "
@@ -872,6 +870,8 @@ std::string App::render_save(bool save) {
"</div>";
}
std::string App::render_menu(const std::string &key) {
if (key == "news")
return "<div class=\"fill\" style=\"z-index:100;\">" + render_news() + "</div>";
std::string body;
if (key == "tables" || key == "strengths" || key == "league" || key == "other")
body = render_reports(key);
@@ -897,6 +897,8 @@ std::string App::render_menu(const std::string &key) {
body = render_highscore();
else if (key == "stadium")
body = render_stadium();
else if (key == "statistics")
body = render_statistics();
else if (key == "environment")
body = render_environment();
else if (key == "advertising")
@@ -933,5 +935,6 @@ std::string App::render_menu(const std::string &key) {
if (labels.contains(bank_view_)) heading += " · " + labels.at(bank_view_);
}
return "<div class=\"fill\" style=\"z-index:100;\">" +
window(heading, body) + "</div>";
window(heading, body) +
(key == "statistics" ? render_statistics_trophy() : "") + "</div>";
}