Complete the Modern main menu and persistent mod library (by Codex)
This commit is contained in:
1 parent
ab4a962a39
commit
6bcd95d668
21 files changed
+2043
-248
No files matched your search
@@ -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", "settings.rcss", "widgets.rcss", "files.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", "widgets.rcss", "files.rcss", "front.rcss"}) {
|
||||
std::ifstream input(root / name);
|
||||
require(bool(input), "Production stylesheet missing");
|
||||
css << input.rdbuf() << '\n';
|
||||
@@ -196,6 +196,10 @@ int main(int argc, char **argv) try {
|
||||
"<div class='desk-fixture'><div><span id='fixture-label'>Synthetic Club</span></div></div></div>";
|
||||
content += "<div id='gallery-scroll-test' class='modern-widget-gallery' style='left:2700dp;top:1500dp;width:900dp;height:200dp;max-height:200dp;'>"
|
||||
"<div style='position:relative;height:1000dp;'><article class='widget-gallery-item' style='top:600dp;'></article></div></div>";
|
||||
content += "<div class='main-options' style='left:40dp;top:2020dp;'>" +
|
||||
button_markup("load", "<span id='front-test-label'>Spiel laden</span><span class='front-hover-arrow'>›</span>", "front-menu-action", "id='front-test-button'") + "</div>"
|
||||
"<div class='front-mod-entry' style='position:absolute;left:2100dp;top:1800dp;width:1100dp;'>"
|
||||
"<span class='front-mod-copy'><strong id='mod-test-name'>Synthetic world</strong><small><span>OpenBMH</span></small></span><span class='front-mod-type'>Modern</span></div>";
|
||||
auto *doc = context->LoadDocumentFromMemory(
|
||||
"<rml><head><style>" + css.str() + "</style></head><body class='" +
|
||||
theme + "'>" + content + "</body></rml>");
|
||||
@@ -212,7 +216,7 @@ int main(int argc, char **argv) try {
|
||||
}
|
||||
require(doc->GetElementById("gallery-scroll-test")->GetScrollHeight() > doc->GetElementById("gallery-scroll-test")->GetClientHeight()*2,"Gallery content does not contribute to scroll extent");
|
||||
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", "settings-row-label", "settings-row-help", "month-label", "warning-label", "fixture-label"}) {
|
||||
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", "month-label", "warning-label", "fixture-label", "front-test-label", "mod-test-name"}) {
|
||||
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");
|
||||
@@ -223,6 +227,7 @@ int main(int argc, char **argv) try {
|
||||
centered_text(*button, *button);
|
||||
}
|
||||
centered_text(*doc->GetElementById("month-label"), *doc->GetElementById("month-box"));
|
||||
centered_text(*doc->GetElementById("front-test-label"),*doc->GetElementById("front-test-button"),false);
|
||||
auto *list = doc->GetElementById("list");
|
||||
centered_text(*list, *list, false);
|
||||
auto *rich = doc->GetElementById("rich");
|
||||
|
||||
Reference in new issue
Block a user