diff --git a/assets/modern/sports.rcss b/assets/modern/sports.rcss index fb9ee48..8fb79cd 100644 --- a/assets/modern/sports.rcss +++ b/assets/modern/sports.rcss @@ -35,6 +35,9 @@ .tactic-hotspot:focus-visible {border:3dp var(--accent);} .tactic-effort {position:absolute;left:1021.188dp;top:1000dp;width:1012dp;height:316.875dp;color:#f1efe2;} .tactic-effort-label {display:flex;align-items:baseline;gap:18dp;font-family:Chalk;font-size:60dp;line-height:1.2;letter-spacing:4dp;} +.tactic-chalk-name {display:flex;align-items:center;justify-content:center;font-family:Chalk;font-size:44dp;letter-spacing:3dp;color:#f1efe2;pointer-events:none;} +.tactic-chalk-name.off {color:#f1efe2b0;} +.tactic-chalk-name span {display:block;} .tactic-effort-marks {font-size:52dp;letter-spacing:1dp;line-height:1.2;} .tactic-effort input {position:absolute;left:2dp;top:96dp;width:96%;height:20dp;} .tactic-effort input slidertrack {margin:8dp 0;height:4dp;} diff --git a/src/modern/ui/demo_sports.cpp b/src/modern/ui/demo_sports.cpp index 85cc36a..a31602c 100644 --- a/src/modern/ui/demo_sports.cpp +++ b/src/modern/ui/demo_sports.cpp @@ -321,6 +321,8 @@ std::string tactics_diagram(const Json &state, const std::string &theme, if (values[size_t(5 + k)] == 0) { line(x + 3, 12, x + 55, 44, chalk, 1.7); line(x + 55, 12, x + 3, 44, chalk, 1.7); + // switched off: the name written under the field (set by the screen) is struck out + line(x + 2, 52.6, x + 56, 51.4, chalk, 1.3); } } dot(29, 111); diff --git a/src/modern/ui/sports_screens.inc b/src/modern/ui/sports_screens.inc index f8e77bf..2c03869 100644 --- a/src/modern/ui/sports_screens.inc +++ b/src/modern/ui/sports_screens.inc @@ -154,12 +154,17 @@ std::string App::render_tactics() { {63, 84, 54, 30}, {26, 95, 24, 24}, {168, 53, 71, 34}, - {137, 10, 58, 37}, - {205, 10, 58, 37}}}; + {137, 10, 58, 47}, + {205, 10, 58, 47}}}; std::string body = "
" + picture(renderer_.diagram("tactics", tactics_diagram(t, theme_, engine_mode_ ? t.at("board").at("points") : snap().state.value("lineup", Json::object()).value("points", Json()), engine_mode_ ? t.at("board").at("depth_max").get() : 18, engine_mode_ ? t.at("board").at("lane_max").get() : 8)), 2300, 1864); + // the two switches by name, in chalk under their fields; the board strikes out one that is off + for (size_t k = 0; k < 2; ++k) + body += "
() ? "" : " off") + "\" style=\"position:absolute;" + + rect((137 + k * 68) / 295.0 * 2300, 47.5 / 206.0 * 1864 + 67, 58 / 295.0 * 2300, 9 / 206.0 * 1864) + "\">" + + (k ? "PRESSING" : "ABSEITSFALLE") + "
"; for (size_t i = 0; i < 7; ++i) { const auto a = areas[i]; body += btn("tactic-cycle", "", "tactic-hotspot",