Display the real title screen behind the prelaunch menu (#638)

* Start game execution as soon as a disk image is available

* Do not update dDemo_c if prelaunch document is visible

* Prevent intro music until prelaunch has popped

* Replace "Start Game" references with "Play"

* Make prelaunch layout respect mirror mode

* Add drop shadow to prelaunch disk-status and version-info

* Remove ImGui prelaunch

* Add "Change Disk Image" button to prelaunch options

* Actually validate discs and make prelaunch very betterer :)

* Check your build before pushing dumbass, and go to sleep

* "Disc" consistency, adjust restart notice logic

* Better LanguageSelect logic

* Add restart notice to SaveTypeSelect

* Added wind sounds to the pre-launch menu

* Add Modal document, use it for disc verification

* Consolidate Modal and PresetWindow

* Squash various bugs, rearrange document flow

* Allow Window inheritors to opt-out of being toggleable

* Tweak focus behavior/syntax

* Implement "Restart Now" option

* Tweaks

* Remove a bunch of dynamic_cast

* Update README.md

---------

Co-authored-by: Luke Street <luke@street.dev>
This commit is contained in:
Irastris
2026-05-05 14:18:25 -04:00
committed by GitHub
parent 7300c0e0f5
commit 08321699cd
27 changed files with 911 additions and 485 deletions
+19
View File
@@ -10,6 +10,7 @@
#include "aurora/lib/window.hpp"
#include "input.hpp"
#include "prelaunch.hpp"
#include "window.hpp"
namespace dusk::ui {
@@ -73,6 +74,13 @@ bool any_document_visible() noexcept {
[](const auto& doc) { return doc && doc->visible(); });
}
bool is_prelaunch_open() noexcept {
return std::any_of(sDocuments.begin(), sDocuments.end(), [](const auto& doc) {
const auto* prelaunch = dynamic_cast<const Prelaunch*>(doc.get());
return prelaunch != nullptr && !prelaunch->pending_close() && !prelaunch->closed();
});
}
Document* top_document() noexcept {
for (auto& doc : std::views::reverse(sDocuments)) {
if (!doc->closed() && !doc->pending_close()) {
@@ -140,6 +148,17 @@ std::string escape(std::string_view str) noexcept {
return result;
}
Rml::Element* append(Rml::Element* parent, const Rml::String& tag) noexcept {
if (parent == nullptr) {
return nullptr;
}
auto* doc = parent->GetOwnerDocument();
if (doc == nullptr) {
return nullptr;
}
return parent->AppendChild(doc->CreateElement(tag));
}
NavCommand map_nav_event(const Rml::Event& event) noexcept {
const auto key = static_cast<Rml::Input::KeyIdentifier>(
event.GetParameter<int>("key_identifier", Rml::Input::KI_UNKNOWN));