Port settings and automation to the Modern UI (by Codex)

This commit is contained in:
Codex committed 2026-10-25 21:36:18 +01:00
1 parent 8222926d9c
commit adb4166a80
26 files changed
+2734 -179

No files matched your search

+10 -3
View File
@@ -113,7 +113,7 @@ int main(int argc, char **argv) try {
std::ostringstream css;
for (const auto *name : {"theme.rcss", "ticket.rcss", "sports.rcss",
"calendar.rcss", "reports.rcss", "report_details.rcss",
"report_pickers.rcss", "indoor.rcss", "planning.rcss", "almanac.rcss", "finance.rcss", "bank.rcss", "contracts.rcss", "amount.rcss", "environment.rcss", "advertising.rcss", "toto.rcss", "lineup.rcss", "transfer.rcss", "career_reports.rcss", "rankings.rcss", "stadium.rcss", "statistics.rcss", "news.rcss"}) {
"report_pickers.rcss", "indoor.rcss", "planning.rcss", "almanac.rcss", "finance.rcss", "bank.rcss", "contracts.rcss", "amount.rcss", "environment.rcss", "advertising.rcss", "toto.rcss", "lineup.rcss", "transfer.rcss", "career_reports.rcss", "rankings.rcss", "stadium.rcss", "statistics.rcss", "news.rcss", "settings.rcss"}) {
std::ifstream input(root / name);
require(bool(input), "Production stylesheet missing");
css << input.rdbuf() << '\n';
@@ -181,6 +181,13 @@ int main(int argc, char **argv) try {
select("manager-strength") + "</div><div class='bottom-controls'>" +
button_markup("continue", "Continue", {}, "id='footer'") +
select("tall") + "</div></div>";
content += "<div style='position:absolute;left:2700dp;top:800dp;width:1100dp;'>"
"<div class='settings-row'><label><span id='settings-row-label'>Automatische Aufstellung</span>"
"<small id='settings-row-help'>Aufgaben an den Co-Trainer abgeben.</small></label>"
"<select id='settings-control' class='settings-select'><option selected>1920 × 1080</option>"
"<option>3840 × 2160</option></select></div>"
"<div class='settings-jump-label'><select id='settings-jump-test' class='settings-select'>"
"<option selected>Spielablauf und Wettbewerbe</option><option>Ergebnisse</option></select></div></div>";
auto *doc = context->LoadDocumentFromMemory(
"<rml><head><style>" + css.str() + "</style></head><body class='" +
theme + "'>" + content + "</body></rml>");
@@ -196,7 +203,7 @@ int main(int argc, char **argv) try {
context->Render();
}
require(!center_selects(*doc), "Control centering does not settle");
for (const auto *id : {"stats-scale-label", "stats-legend-label", "stats-player-label", "stats-world-label", "stats-from-label", "stats-winner-label", "news-brand-test"}) {
for (const auto *id : {"stats-scale-label", "stats-legend-label", "stats-player-label", "stats-world-label", "stats-from-label", "stats-winner-label", "news-brand-test", "settings-row-label", "settings-row-help"}) {
auto *label = doc->GetElementById(id);
require(label && label->GetBox().GetSize(Rml::BoxArea::Content).x > 0 && visible_text_lines(*label) > 0,
"A production statistics/news label has collapsed or lost its font face");
@@ -215,7 +222,7 @@ int main(int argc, char **argv) try {
rich->QuerySelector(".picture")->GetAbsoluteOffset().y,
"Rich card stacking changed");
for (const auto *id :
{"natural", "toolbar", "tall", "manager-strength"}) {
{"natural", "toolbar", "tall", "manager-strength", "settings-control", "settings-jump-test"}) {
auto *control = doc->GetElementById(id);
auto *caption = select_part(*control, "selectvalue"),
*arrow = select_part(*control, "selectarrow");