Complete Modern season preparation with persistent draw progress (by Codex)
This commit is contained in:
1 parent
967520190d
commit
e81ecf95f2
27 files changed
+1432
-208
No files matched your search
+14
-27
@@ -149,6 +149,7 @@ void App::ProcessEvent(Rml::Event &event) try {
|
||||
return;
|
||||
if(front_event(event))return;
|
||||
if (entry_event(event)) return;
|
||||
if (opening_event(event)) return;
|
||||
if (amount_event(event)) return;
|
||||
if (popup_.empty() && settings_event(event)) return;
|
||||
if (popup_.empty() && (files_event(event) || widget_event(event))) return;
|
||||
@@ -464,6 +465,7 @@ void App::dispatch(const std::string &action, Rml::Element *target) {
|
||||
target ? target->GetAttribute<Rml::String>("data-id", "") : std::string();
|
||||
if(front_action(action,target))return;
|
||||
if (entry_action(action, target)) return;
|
||||
if (opening_action(action, target)) return;
|
||||
if (settings_action(action,target)) return;
|
||||
if (files_action(action,target) || widget_action(action,target)) return;
|
||||
if (lineup_action(action, target) || transfer_action(action, target)) return;
|
||||
@@ -674,33 +676,6 @@ void App::dispatch(const std::string &action, Rml::Element *target) {
|
||||
entry_begin();
|
||||
return;
|
||||
}
|
||||
if (action == "opening-play") {
|
||||
draw_playing_ = !draw_playing_;
|
||||
draw_at_ = SDL_GetTicks64() + 900;
|
||||
refresh();
|
||||
return;
|
||||
}
|
||||
if (action == "opening-next") {
|
||||
++opening_page_;
|
||||
if (opening_page_ == 3)
|
||||
draw_at_ = SDL_GetTicks64() + 900;
|
||||
refresh();
|
||||
return;
|
||||
}
|
||||
if (action == "opening-all") {
|
||||
draw_revealed_ = 64;
|
||||
opening_page_ = 4;
|
||||
refresh();
|
||||
return;
|
||||
}
|
||||
if (action == "opening-finish") {
|
||||
if (opening_page_ != 4)
|
||||
return;
|
||||
scene_ = "desktop";
|
||||
apply("opening", "complete");
|
||||
refresh();
|
||||
return;
|
||||
}
|
||||
if (action == "desktop-context") {
|
||||
context_menu({}, 0, 0);
|
||||
return;
|
||||
@@ -961,6 +936,18 @@ void App::script() {
|
||||
(command.value("shift", false) ? Rml::Input::KM_SHIFT : 0);
|
||||
context_->ProcessKeyDown(keys.at(name), mods);
|
||||
context_->ProcessKeyUp(keys.at(name), mods);
|
||||
} else if (type == "wait") {
|
||||
const int milliseconds = command.at("milliseconds").get<int>();
|
||||
if (milliseconds < 0 || milliseconds > 30000)
|
||||
throw editor::Error("UI-Wartezeit muss zwischen 0 und 30000 ms liegen.");
|
||||
const auto until = SDL_GetTicks64() + uint64_t(milliseconds);
|
||||
while (!closed_ && SDL_GetTicks64() < until) {
|
||||
pump_events();
|
||||
front_poll();
|
||||
opening_tick();
|
||||
frame();
|
||||
SDL_Delay(5);
|
||||
}
|
||||
} else if (type == "screenshot")
|
||||
screenshot(editor::path(command.at("path").get<std::string>()));
|
||||
else if (type == "checkpoint") {
|
||||
|
||||
Reference in new issue
Block a user