A player's card with figures and skills; shirts in the club's colour; table zones; reduced motion

The card shows age, strength, condition, technique and form as numerals, the seven
skills as marks and contract and status as a list. The line-up pitch draws shirts in
the club's colour with a condition dot instead of the data set's figures. League
tables carry the prediction's European places and the promotion and relegation
places. A display setting turns transitions off. The desk hangs from the top edge of
a taller screen.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
MichaelandClaude Fable 5.2 committed 2026-11-14 18:43:40 +01:00
1 parent 9b33e1f8c1
commit eec7f40a52
16 files changed
+160 -26

No files matched your search

+13 -2
View File
@@ -412,6 +412,7 @@ class App final : public Rml::EventListener {
bool initialized_ = false, closed_ = false, dirty_ = true,
needs_render_ = true;
double scale_ = 1, canvas_left_ = 0, canvas_top_ = 0;
bool desk_top_ = false;
// A menu window (2720 x 2040 at the middle of the stage) is shown as large as the screen
// allows; the desk behind it is cropped. Without a window the whole stage is fitted.
bool window_zoom_ = false;
@@ -565,6 +566,11 @@ class App final : public Rml::EventListener {
bool world = false, bool cover = false, int pixels = 512) {
return picture(renderer_.image(key, world, pixels), w, h, cover);
}
// the theme, and "calm" when the player asked for reduced motion
std::string body_classes() const {
return theme_ + (ui_preferences_.is_object() && ui_preferences_.contains("display") &&
ui_preferences_.at("display").value("motion", "full") == "reduced" ? " calm" : "");
}
std::string picture(const Picture &p, double w, double h,
bool cover = false) {
if (p.token.empty())
@@ -922,8 +928,12 @@ class App final : public Rml::EventListener {
void sync_window_zoom() {
const bool wanted = doc_->QuerySelector(".window") != nullptr || doc_->QuerySelector(".live-stage") != nullptr;
if (!wanted) window_shown_ = "\x01";
if (wanted == window_zoom_) return;
// the career's desk hangs from the top edge of a taller screen, so its bar is the
// screen's bar and the spare height shows the stadium below
const bool desk = !wanted && (scene_ == "engine" || scene_ == "desktop");
if (wanted == window_zoom_ && desk == desk_top_) return;
window_zoom_ = wanted;
desk_top_ = desk;
resize();
}
void resize() {
@@ -936,6 +946,7 @@ class App final : public Rml::EventListener {
if (window_zoom_) scale_ = std::max(scale_, std::min(double(pw) / 2760, double(ph) / 2080));
canvas_left_ = (pw - 3840 * scale_) / 2;
canvas_top_ = (ph - 2160 * scale_) / 2;
if (desk_top_ && canvas_top_ > 0) canvas_top_ = 0;
device_ratio_ = float(pw) / w;
renderer_.SetViewport(pw, ph);
context_->SetDimensions({pw, ph});
@@ -1024,7 +1035,7 @@ class App final : public Rml::EventListener {
ticket_->close(false);
context_open_ = false;
context_dirty_ = true;
doc_->SetClassNames(theme_);
doc_->SetClassNames(body_classes());
std::string markup;
if (scene_ == "main")
markup = main_menu();