The desk is as high as the screen shows of it

On a screen taller than 16:9 the career's desk offers its lower rows for widgets and
icons (up to 4:3). A stored layout may use the greatest height; objects a shorter
screen cannot show are moved back into sight. Property names read as nouns throughout
the bank.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
MichaelandClaude Fable 5.2 committed 2026-11-14 20:47:31 +01:00
1 parent e3edd2f9ed
commit b3e5ef4b4d
7 files changed
+82 -6

No files matched your search

+16
View File
@@ -960,6 +960,22 @@ class App final : public Rml::EventListener {
canvas_left_ = (pw - 3840 * scale_) / 2;
canvas_top_ = (ph - 2160 * scale_) / 2;
if (desk_top_ && canvas_top_ > 0) canvas_top_ = 0;
// a career's desk is as high as the screen shows of it; menus keep their 16:9 stage
const bool desk_scene = scene_ == "engine" || scene_ == "desktop";
const double fitted = std::min(double(pw) / 3840, double(ph) / 2160);
const int stage_height = desk_scene ? std::clamp(int(ph / fitted), 2160, 2880) : 2160;
if (stage_height != desktop_height()) {
set_desktop_height(stage_height);
needs_render_ = true;
}
element("canvas")->SetProperty("height", std::to_string(stage_height) + "dp");
if (desk_scene && desktop_.is_object() && desktop_.contains("objects")) {
const bool clean = desktop_ == saved_desktop_;
if (fit_desktop(desktop_)) {
if (clean) saved_desktop_ = desktop_;
needs_render_ = true;
}
}
device_ratio_ = float(pw) / w;
renderer_.SetViewport(pw, ph);
context_->SetDimensions({pw, ph});