Paper windows, a display serif and chalk hand, a symmetric tactics board, the match day as a stage
- Material: menu windows are sheets of paper (warm surface, edge, two sheets beneath, serif headings) that slide in once when their menu opens; the desk stays glass. Source Serif 4 and Cabin Sketch ship in assets/modern/fonts (SIL OFL, see THIRD_PARTY_NOTICES.md); system fonts remain the fallback. - Tactics board: 320 x 200 units mirrored about its middle - the pitch of the attitude on the left, six equal tiles for the play settings on the right with their names in chalk, the commitment with a scale across the foot. - Live match: a 4:3 sheet like the menus (same window zoom) on the darkened stadium. One score board per match of a human manager - a full-width card for one match, two side by side, a 2 x 2 grid for three or four - with crests, a score plate in the clubs' colours (read from the crests), a clock ring, a pressure bar, and a time line of goals, cards and injuries. Compact ticker rows with a mark per kind, a goal banner on the card, a horizontal speed control, and optional halts at half time and when falling behind. - QA: script command demo-start begins a demo career with 1-4 managers. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
1 parent
54fef90a5b
commit
9b5d448fb6
21 files changed
+887
-125
No files matched your search
@@ -149,31 +149,22 @@ std::string App::render_tactics() {
|
||||
"Flache / hohe Bälle", "Flügelbild links",
|
||||
"Flügelbild rechts", "Einsatz"};
|
||||
const std::array<int, 8> limits = engine_mode_ ? t.at("limits").get<std::array<int, 8>>() : std::array<int, 8>{3, 3, 3, 3, 1, 1, 1, 11};
|
||||
const std::array<std::array<int, 4>, 7> areas = {{{19, 9, 104, 62},
|
||||
{61, 108, 50, 34},
|
||||
{63, 84, 54, 30},
|
||||
{26, 95, 24, 24},
|
||||
{168, 53, 71, 34},
|
||||
{137, 10, 58, 47},
|
||||
{205, 10, 58, 47}}};
|
||||
// the board is drawn at 8dp a unit (tactics_diagram: 320 x 200 units); the pitch of the
|
||||
// attitude and the six tiles are its click areas, each with its name underneath
|
||||
const auto tile = [](size_t i) { return std::array<int, 2>{168 + int((i - 1) % 3) * 46, i <= 3 ? 30 : 80}; };
|
||||
std::string body =
|
||||
"<div class=\"tactics-board\"><div class=\"tactics-surface\"></div>" +
|
||||
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<int>() : 18, engine_mode_ ? t.at("board").at("lane_max").get<int>() : 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 += "<div class=\"tactic-chalk-name" + std::string(t["values"][5 + k].get<int>() ? "" : " 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) + "\"><span>" +
|
||||
(k ? "PRESSING" : "ABSEITSFALLE") + "</span></div>";
|
||||
"<div class=\"tactics-board\">" +
|
||||
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<int>() : 18, engine_mode_ ? t.at("board").at("lane_max").get<int>() : 8)), 2560, 1600);
|
||||
static const std::array<const char *, 7> chalk_names{"GRUNDAUSRICHTUNG", "FLÜGELSPIEL", "STEILPÄSSE", "ABSCHLAG", "FLACH / HOCH", "ABSEITSFALLE", "PRESSING"};
|
||||
for (size_t i = 0; i < 7; ++i) {
|
||||
const auto a = areas[i];
|
||||
const std::array<int, 4> a = i ? std::array<int, 4>{tile(i)[0], tile(i)[1], 40, 46} : std::array<int, 4>{20, 30, 132, 96};
|
||||
const bool off = i >= 5 && t["values"][i].get<int>() == 0;
|
||||
body += "<div class=\"tactic-chalk-name" + std::string(off ? " off" : "") + "\" style=\"position:absolute;" +
|
||||
rect((a[0] - 6) * 8, (a[1] + a[3] - 11) * 8, (a[2] + 12) * 8, 80) + "\"><span>" + chalk_names[i] + "</span></div>";
|
||||
body += btn("tactic-cycle", "", "tactic-hotspot",
|
||||
"id=\"tactic-cycle-" + std::to_string(i) + "\" data-id=\"" +
|
||||
std::to_string(i) + "\" aria-label=\"" + esc(names[i]) +
|
||||
"\" style=\"position:absolute;" +
|
||||
rect(a[0] / 295.0 * 2300, a[1] / 206.0 * 1864,
|
||||
a[2] / 295.0 * 2300, a[3] / 206.0 * 1864) +
|
||||
"z-index:" + std::to_string(8 - i) + ";\"");
|
||||
"\" style=\"position:absolute;" + rect(a[0] * 8, a[1] * 8, a[2] * 8, a[3] * 8) + "\"");
|
||||
}
|
||||
const int effort = t["values"][7].get<int>();
|
||||
body +=
|
||||
@@ -184,7 +175,7 @@ std::string App::render_tactics() {
|
||||
"</span></div><input type=\"range\" id=\"tactic-effort\" "
|
||||
"data-input=\"tactic-effort\" min=\"" + std::to_string(engine_mode_ ? t.at("minima")[7].get<int>() : 0) + "\" max=\"" + std::to_string(limits[7]) + "\" step=\"1\" value=\"" +
|
||||
std::to_string(effort) +
|
||||
"\"/></div><p id=\"tactic-hint\" class=\"tactic-hint\">" +
|
||||
"\"/><div class=\"tactic-effort-ends\"><span>LOCKER</span><span>VOLLGAS</span></div></div><p id=\"tactic-hint\" class=\"tactic-hint\">" +
|
||||
(engine_mode_
|
||||
? "<strong>" + esc(names[size_t(last_tactic_)] + ": " + tactic_value_text(size_t(last_tactic_), t["values"][size_t(last_tactic_)].get<int>(), limits[size_t(last_tactic_)])) + "</strong><span>" + esc(tactic_effect_text(size_t(last_tactic_))) + "</span>"
|
||||
: esc(names[size_t(last_tactic_)]) + ": " +
|
||||
|
||||
Reference in new issue
Block a user