Port achievements and player rankings to the Modern UI (by Codex)
This commit is contained in:
1 parent
d419943e86
commit
96e88c9579
29 files changed
+1362
-17
No files matched your search
@@ -164,6 +164,7 @@ void App::ProcessEvent(Rml::Event &event) try {
|
||||
}
|
||||
if (popup_.empty() && amount_trigger_event(event)) return;
|
||||
if (popup_.empty() && report_detail_kind_.empty() && (lineup_event(event) || transfer_event(event))) return;
|
||||
if (popup_.empty() && report_detail_kind_.empty() && (career_report_event(event) || rankings_event(event))) return;
|
||||
if (popup_.empty() && contracts_event(event)) return;
|
||||
if (popup_.empty() && (advertising_event(event) || toto_event(event))) return;
|
||||
if (popup_.empty() && (bank_event(event) || finance_event(event))) return;
|
||||
@@ -386,15 +387,19 @@ void App::ProcessEvent(Rml::Event &event) try {
|
||||
auto *root = !popup_.empty() ? element("popup")
|
||||
: !planning_dialog_.empty() ? element("planning-layer")
|
||||
: !report_detail_kind_.empty() ? element("report-detail-layer")
|
||||
: !career_view_.value("dialog", "").empty() ? element("career-history-layer")
|
||||
: element("canvas");
|
||||
root->QuerySelectorAll(
|
||||
controls, !popup_.empty() || !report_detail_kind_.empty() || !planning_dialog_.empty()
|
||||
controls, !popup_.empty() || !report_detail_kind_.empty() || !planning_dialog_.empty() || !career_view_.value("dialog", "").empty()
|
||||
? "button,input,select"
|
||||
: ".window button,.window input,.window select");
|
||||
controls.erase(std::remove_if(controls.begin(), controls.end(),
|
||||
[](auto *n) {
|
||||
[this](auto *n) {
|
||||
return !n->IsVisible(true) ||
|
||||
n->HasAttribute("disabled");
|
||||
n->HasAttribute("disabled") ||
|
||||
(menu_ == "scorers" &&
|
||||
n->GetId().starts_with("player-stat-tab-") &&
|
||||
n->template GetAttribute<Rml::String>("aria-selected", "false") != "true");
|
||||
}),
|
||||
controls.end());
|
||||
const auto current = context_->GetFocusElement();
|
||||
@@ -452,6 +457,7 @@ void App::dispatch(const std::string &action, Rml::Element *target) {
|
||||
const auto id =
|
||||
target ? target->GetAttribute<Rml::String>("data-id", "") : std::string();
|
||||
if (lineup_action(action, target) || transfer_action(action, target)) return;
|
||||
if (career_report_action(action, target) || rankings_action(action, target)) return;
|
||||
if (environment_action(action, target) || advertising_action(action, target) || toto_action(action, target)) return;
|
||||
if (amount_action(action, target) || bank_action(action, target) || finance_action(action, target) || contracts_action(action, target)) return;
|
||||
if (almanac_action(action, target) || planning_action(action, target) || indoor_action(action, target)) return;
|
||||
@@ -1065,7 +1071,7 @@ void App::dispatch(const std::string &action, Rml::Element *target) {
|
||||
}
|
||||
static const std::set<std::string> available = {
|
||||
"tables", "strengths", "camp", "settings",
|
||||
"save", "load", "training", "tactics", "calendar", "league", "other", "postpone", "friendlies", "indoor", "almanac", "bank", "balance", "contracts", "environment", "advertising", "toto", "lineup", "transfer"};
|
||||
"save", "load", "training", "tactics", "calendar", "league", "other", "postpone", "friendlies", "indoor", "almanac", "bank", "balance", "contracts", "environment", "advertising", "toto", "lineup", "transfer", "achievements", "scorers", "fairplay", "highscore"};
|
||||
if (!available.contains(route)) {
|
||||
message("Diese native Ansicht wird im nächsten Menüpaket übertragen.");
|
||||
return;
|
||||
@@ -1456,6 +1462,7 @@ void App::script() {
|
||||
{"toto_view", {{"column", toto_column_}, {"dialog", toto_dialog_}}},
|
||||
{"lineup_view", {{"pitch", lineup_pitch_}, {"data", lineup_data_}, {"page", lineup_page_}, {"side", lineup_side_}, {"selected", lineup_selected_}, {"drag", lineup_drag_}}},
|
||||
{"transfer_view", transfer_view_}, {"transfer_dialog", transfer_dialog_}, {"transfer_draft", transfer_draft_},
|
||||
{"career_view", career_view_}, {"rankings_view", rankings_view_},
|
||||
{"contracts_view", {{"dialog", contracts_dialog_}, {"player", contracts_player_}, {"tab", contracts_tab_}, {"draft", contract_draft_}}},
|
||||
{"amount_editor", amount_ ? Json{{"title", amount_->request.title}, {"raw", amount_->raw}, {"review", amount_->review}, {"error", amount_error()}} : Json()},
|
||||
{"source_revision", source_ ? Json(snap().revision) : Json()},
|
||||
|
||||
Reference in new issue
Block a user