implement basic warp to start button in rando menu

serves as a sort of placeholder until Midna can be properly edited to behave like console rando
This commit is contained in:
CraftyBoss
2026-05-19 17:40:49 -07:00
parent ba9dc8e9ba
commit d25695be0e
2 changed files with 27 additions and 0 deletions
@@ -60,6 +60,15 @@ public:
// };
std::unordered_map<u32, std::string> mTextOverrides{};
// TODO: hook this up to generator data
struct {
// for now use hardcoded values for this
std::string mapName = "F_SP103"; // (Ordon) Outside Link's House
int pointNo = 1;
int roomNo = 1;
int mapLayer = -1;
} mStartLocation;
std::optional<std::string> WriteToFile();
std::optional<std::string> LoadFromHash(const std::string& hash);
std::filesystem::path GetSeedDataPath() const;
+18
View File
@@ -459,6 +459,24 @@ RandomizerWindow::RandomizerWindow() {
rando_config_toggle(leftPane, rightPane, "Ball and Chain Webs");
rando_config_toggle(leftPane, rightPane, "Logic Transform Anywhere");
});
if (randomizer_IsActive()) {
add_tab("In-Game", [this](Rml::Element* content) {
auto& leftPane = add_child<Pane>(content, Pane::Type::Controlled);
auto& rightPane = add_child<Pane>(content, Pane::Type::Uncontrolled);
leftPane.add_section("General");
leftPane.register_control(leftPane.add_button("Warp to Start").on_pressed([] {
mDoAud_seStartMenu(kSoundClick);
auto& locData = randomizer_GetContext().mStartLocation;
dComIfGp_setNextStage(locData.mapName.c_str(), locData.pointNo, locData.roomNo, locData.mapLayer);
}), rightPane, [](Pane& pane) {
pane.clear();
pane.add_rml("Respawns the player at their appropriate starting location.");
});
});
}
}
void RandomizerWindow::update() {