The manager as a page of the notebook: one picture with three scenes
The scene under the pointer is framed and lit, the others step back, and under the picture stands what the scene does. The picture is the project's own; the page is left by any other marker of the book. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
1 parent
6020fbc30a
commit
592bc28e9c
12 files changed
+128
-142
No files matched your search
@@ -916,7 +916,9 @@ class App final : public Rml::EventListener {
|
||||
// what the page says in the heading of the sheet instead of its plain name, and after it
|
||||
std::string page_title_, page_hint_;
|
||||
// a career menu is a page of the notebook, not a window of its own
|
||||
bool notebook_page() const { return (scene_ == "desktop" || scene_ == "engine") && !menu_.empty(); }
|
||||
// the manager's page is a scene of its own; for the book it is the page "newplayer"
|
||||
std::string notebook_menu() const { return scene_ == "managerhub" ? std::string("newplayer") : menu_; }
|
||||
bool notebook_page() const { return (scene_ == "desktop" || scene_ == "engine" || scene_ == "managerhub") && !notebook_menu().empty(); }
|
||||
bool calendar_month_action(const std::string &, Rml::Element *);
|
||||
void calendar_open_month(int);
|
||||
Json planning_calendar() const;
|
||||
@@ -1012,6 +1014,7 @@ class App final : public Rml::EventListener {
|
||||
bool entry_event(Rml::Event &);
|
||||
Json entry_snapshot() const;
|
||||
bool career_resign_open_=false,career_game_end_=false;
|
||||
std::string career_hint_; // the scene of the manager's picture the pointer is on
|
||||
int career_resign_portrait_=0;
|
||||
uint64_t career_resign_revision_=0;
|
||||
const DataSource *career_resign_source_=nullptr;
|
||||
@@ -1070,7 +1073,7 @@ class App final : public Rml::EventListener {
|
||||
if (!wanted) window_shown_ = "\x01";
|
||||
// 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");
|
||||
const bool desk = !wanted && (scene_ == "engine" || scene_ == "desktop" || scene_ == "managerhub");
|
||||
if (wanted == window_zoom_ && desk == desk_top_) return;
|
||||
window_zoom_ = wanted;
|
||||
desk_top_ = desk;
|
||||
@@ -1088,7 +1091,7 @@ class App final : public Rml::EventListener {
|
||||
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 bool desk_scene = scene_ == "engine" || scene_ == "desktop" || scene_ == "managerhub";
|
||||
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()) {
|
||||
@@ -1202,7 +1205,7 @@ class App final : public Rml::EventListener {
|
||||
else if (scene_ == "manager")
|
||||
markup = (adding_manager_?render_desktop():main_menu())+"<div class=\"fill\" style=\"z-index:100;\">"+render_manager()+"</div>";
|
||||
else if (scene_ == "managerhub")
|
||||
markup = render_desktop()+"<div class=\"fill\" style=\"z-index:100;\">"+render_career()+"</div>";
|
||||
markup = render_desktop()+"<div class=\"fill menu-layer\" style=\"z-index:100;\">"+render_career()+"</div>";
|
||||
else if (scene_ == "opening")
|
||||
markup = main_menu()+"<div class=\"fill\" style=\"z-index:100;\">"+render_opening()+"</div>";
|
||||
else if (scene_ == "live")
|
||||
@@ -1224,7 +1227,7 @@ class App final : public Rml::EventListener {
|
||||
doc_->QuerySelectorAll(behind, "#entry-manager-underlay button,#entry-manager-underlay input,#entry-manager-underlay select,.window>.titlebar button");
|
||||
for (auto *node : behind) node->SetProperty("pointer-events", "none");
|
||||
}
|
||||
if(scene_=="managerhub" || (scene_=="manager"&&adding_manager_)){
|
||||
if(scene_=="manager"&&adding_manager_){
|
||||
Rml::ElementList background;doc_->QuerySelectorAll(background,".desktop-layer button,.desktop-layer [data-action]");
|
||||
for(auto *node:background){node->SetProperty("pointer-events","none");node->SetAttribute("tabindex",-1);}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user