The entry into the game on a pad: main menu, new game, managers, clubs, the season's opening
The main menu and everything up to the first day are written on one pad that lies in the middle of a table: the settings of a new game, the managers with their portraits, the clubs of a league, the entrants of the European cups, the cup draw and its overview. Saved games, mods and the sound open on the same pad. The table fills the window at any aspect while the pad stays whole. There is one style of portrait. The main menu asks before it leaves, and the ribbon of the notebook leads back to it. A stage that changes its height while it is drawn is now drawn once more; before, the notebook kept the height of the screen it came from. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
1 parent
f25abc2e16
commit
048ccbecaa
20 files changed
+637
-812
No files matched your search
@@ -327,7 +327,7 @@ void App::engine_event(Rml::Event &event) {
|
||||
if (!engine_busy_ && popup_.empty() && contracts_event(event)) return;
|
||||
if(engine_opening_active()&&menu_.empty()&&popup_.empty()) {
|
||||
if(type=="keydown") {const auto key=Rml::Input::KeyIdentifier(event.GetParameter<int>("key_identifier",0));
|
||||
if(key==Rml::Input::KI_TAB){Rml::ElementList nodes;doc_->QuerySelectorAll(nodes,".opening-actions button");std::erase_if(nodes,[](auto *n){return n->HasAttribute("disabled");});if(!nodes.empty()){const auto it=std::find(nodes.begin(),nodes.end(),context_->GetFocusElement());const int i=it==nodes.end()?-1:int(it-nodes.begin()),n=int(nodes.size());nodes[size_t((i+n+(event.GetParameter<int>("shift_key",0)?-1:1))%n)]->Focus(true);}event.StopImmediatePropagation();return;}
|
||||
if(key==Rml::Input::KI_TAB){Rml::ElementList nodes;doc_->QuerySelectorAll(nodes,".es-foot button");std::erase_if(nodes,[](auto *n){return n->HasAttribute("disabled");});if(!nodes.empty()){const auto it=std::find(nodes.begin(),nodes.end(),context_->GetFocusElement());const int i=it==nodes.end()?-1:int(it-nodes.begin()),n=int(nodes.size());nodes[size_t((i+n+(event.GetParameter<int>("shift_key",0)?-1:1))%n)]->Focus(true);}event.StopImmediatePropagation();return;}
|
||||
if(key==Rml::Input::KI_RETURN||key==Rml::Input::KI_SPACE){for(auto *n=target;n&&n!=doc_;n=n->GetParentNode())if(n->GetTagName()=="button"&&!n->HasAttribute("disabled")){n->DispatchEvent("click",{});break;}}}
|
||||
if(type=="click")for(auto *n=target;n&&n!=doc_;n=n->GetParentNode())if(n->HasAttribute("data-action")){opening_action(n->GetAttribute<Rml::String>("data-action",""),n);break;}
|
||||
event.StopImmediatePropagation();return;
|
||||
@@ -476,6 +476,13 @@ void App::engine_event(Rml::Event &event) {
|
||||
if (engine_sports_action(action, id, node)) return;
|
||||
if (engine_lineup_action(action, id, node)) return;
|
||||
if (action == "close") { if(menu_=="scorers"||menu_=="fairplay")rankings_remember_scroll(); menu_.clear(); refresh(); }
|
||||
// the ribbon of the notebook: back to the main menu, after asking
|
||||
else if (action == "nb-home") {
|
||||
if (!engine_busy_ && !engine_files_busy_ && popup_.empty()) {
|
||||
confirmation(engine_dirty_ ? "Zurück ins Hauptmenü? Was seit dem letzten Speichern geschah, geht verloren." : "Zurück ins Hauptmenü?", [this] { engine_manager_main(); });
|
||||
popup_accept_ = "Zum Hauptmenü";
|
||||
}
|
||||
}
|
||||
else if (action == "engine-ticket" && engine_fresh_) {
|
||||
const auto price = engine_ticket_projection(engine_data_);
|
||||
ticket_->open(node, device_ratio_, price.at("min"), price.at("max")); dirty_ = true;
|
||||
|
||||
Reference in new issue
Block a user