Present fixed live ticker settings while preserving all stored options (by Codex)

This commit is contained in:
Codex authored and Codex committed 2026-10-27 03:46:40 +01:00
1 parent e710937ca9
commit 9dd8731c66
6 files changed
+158 -8

No files matched your search

+6 -5
View File
@@ -124,7 +124,7 @@ std::string App::render_settings_groups(int *count) const {
terms.push_back(word);
int found = 0;
std::string out;
for (const auto &group : settings_catalogue().at("groups")) {
for (const auto &group : live_settings_catalogue().at("groups")) {
std::string rows;
const auto matches = [&](const Json &o, const std::string &competition) {
const auto text = settings_search_key(
@@ -193,13 +193,14 @@ std::string App::render_settings() {
const std::map<std::string, std::pair<std::string, std::string>> captions = {
{"display", {"Anzeige", "Bildschirm und Sprache"}},
{"sound", {"Sound", "Lautstärke, Effekte und Spielton"}},
{"game", {"Spiel", "Spielablauf und Darstellung nach dem Handbuch"}},
{"game", {"Spiel", "Spielablauf und Live-Ticker"}},
{"automation",
{"Automatik",
"Aufstellung, Wechsel, Taktik, Manndeckung und Training"}}};
std::string head = "<div><h2>" + captions.at(settings_category_).first +
"</h2><p>" + captions.at(settings_category_).second +
"</p></div>";
if(settings_category_=="display")head+="<span id=\"settings-transmission-style\" style=\"font-size:28dp;color:var(--muted);\">Live-Ticker · feste Darstellungsart</span>";
if (settings_category_ == "display") {
pane =
"<div class=\"settings-group\"><h3>Gestaltung</h3><p "
@@ -283,7 +284,7 @@ std::string App::render_settings() {
"</div>";
if (!settings_global_only()) {
pane += "<div class=\"settings-group\"><h3>Ton im Spiel</h3>";
for (const auto &o : settings_catalogue().at("sound"))
for (const auto &o : live_settings_catalogue().at("sound"))
pane += settings_option(o);
pane += "</div>";
}
@@ -302,7 +303,7 @@ std::string App::render_settings() {
"abgeben</h3><p class=\"settings-group-help\">Die fünf "
"Automatikfunktionen des Originals. Änderungen werden erst mit "
"„Anwenden“ übernommen.</p>";
for (const auto &o : settings_catalogue().at("automation")) {
for (const auto &o : live_settings_catalogue().at("automation")) {
const auto key = o[0].get<std::string>();
pane += settings_row("automation-" + key, o[1].get<std::string>(),
o[2].get<std::string>(),
@@ -312,7 +313,7 @@ std::string App::render_settings() {
pane += "</div>";
} else {
std::vector<std::pair<std::string, std::string>> groups;
for (const auto &g : settings_catalogue().at("groups"))
for (const auto &g : live_settings_catalogue().at("groups"))
groups.emplace_back(g.at("id").get<std::string>(),
g.at("title").get<std::string>());
head += "<div class=\"settings-jump-label\"><span>Zum Abschnitt</span>" +