Files
Dreierpack-Manager/src/modern/ui/live_state.inc
T
MichaelandClaude Fable 5.2 9b5d448fb6 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>
2026-11-14 16:15:11 +01:00

62 lines
3.2 KiB
C++

// SPDX-License-Identifier: GPL-3.0-only
LivePlayback live_;
Json live_drafts_ = Json::object(), live_dialog_draft_;
std::string live_tab_ = "team", live_coverage_ = "all", live_filter_ = "all",
live_selected_match_, live_dialog_, live_feedback_, live_out_, live_in_;
uint64_t live_last_tick_ = 0;
const DataSource *live_source_ = nullptr;
std::shared_ptr<const Catalog> live_world_;
int live_resume_speed_ = 0;
bool live_speed_dragging_ = false, live_review_ = false,
live_reset_detail_ = false, live_reset_ticker_ = false,
live_restore_scroll_ = false;
bool live_detail_pending_ = false, live_ticker_pending_ = false;
uint64_t live_detail_updates_ = 0, live_ticker_updates_ = 0;
std::string live_ticker_events(const Json &frame, size_t &shown);
void live_update_parts();
float live_ticker_scroll_ = 0, live_detail_scroll_ = 0;
std::string render_live();
std::string live_roster(const Json &owner);
std::string live_detail(const Json &owner, const Json &frame);
std::string live_dialog_markup(const Json &owner);
std::string live_badge(const Json &, double);
// the two club colours of a match (home, away), far enough apart to tell the sides
std::array<std::string, 2> live_colours(const Json &match);
std::string live_card(const Json &match, const Json &frame, const std::string &layout, size_t index);
std::string live_moment_; // the event whose banner was shown last
bool live_halt_interval_ = false, live_halt_behind_ = false;
std::string live_halted_; // the reason of the last automatic halt, cleared when play resumes
Json live_owner() const;
Json live_owner_rows(const Json &) const;
Json live_owner_state(const Json &) const;
bool live_open();
// Engine career: shows the recording of the kickoff that was just played.
bool engine_live_open(const Json &recording);
std::string live_return_scene_;
Json engine_advance_payload_ = Json::object();
Json engine_postmatch_read_; // the engine's post-match read of the last kickoff
std::string engine_expiry_player_;
void engine_kickoff();
// A kickoff of the engine that is played minute by minute while the ticker is open.
bool engine_live_running_ = false, engine_live_busy_ = false, engine_live_at_end_ = false;
std::future<Json> engine_live_job_;
std::string engine_live_revision_;
uint64_t engine_live_elapsed_ = 0;
Json engine_live_roster_ = Json::array(), engine_live_swap_, engine_live_queue_;
// The tactics board during a live kickoff: the engine's controls with the values in force.
Json engine_live_tactics_ = Json::array(), engine_live_tactics_sent_;
bool engine_live_assistant_ = false; // the assistant adapts the attitude until it is set by hand
void engine_live_begin(const Json &state, const std::string &revision);
void engine_live_send(const std::string &kind, const Json &payload);
void engine_live_poll();
void engine_live_enter();
void engine_expiry_ask(const Json &args);
void live_close();
bool live_action(const std::string &, Rml::Element *);
bool live_event(Rml::Event &);
void live_tick();
void live_after_render();
void live_set_speed(int);
void live_dialog_close(bool);
Json live_snapshot() const;