Merge pull request #915 from aMannus/rando-enhancements-menu

Rando: Added extra flyout for item fanfares
This commit is contained in:
briaguya 2022-08-02 03:23:59 -07:00 committed by GitHub
commit bf6ef1344e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1393,19 +1393,43 @@ namespace SohImGui {
for (const auto& category : windowCategories) { for (const auto& category : windowCategories) {
ImGui::SetCursorPosY(0.0f); ImGui::SetCursorPosY(0.0f);
if (ImGui::BeginMenu(category.first.c_str())) { if (category.first != "Randomizer") {
for (const std::string& name : category.second) { if (ImGui::BeginMenu(category.first.c_str())) {
std::string varName(name); for (const std::string& name : category.second) {
varName.erase(std::remove_if(varName.begin(), varName.end(), [](unsigned char x) { return std::isspace(x); }), varName.end()); std::string varName(name);
std::string toggleName = "g" + varName + "Enabled"; varName.erase(std::remove_if(varName.begin(), varName.end(), [](unsigned char x) { return std::isspace(x); }), varName.end());
std::string toggleName = "g" + varName + "Enabled";
EnhancementCheckbox(name.c_str(), toggleName.c_str()); EnhancementCheckbox(name.c_str(), toggleName.c_str());
customWindows[name].enabled = CVar_GetS32(toggleName.c_str(), 0); customWindows[name].enabled = CVar_GetS32(toggleName.c_str(), 0);
}
ImGui::EndMenu();
} }
ImGui::EndMenu();
} }
} }
// Randomizer Menu
ImGui::SetCursorPosY(0.0f);
if (ImGui::BeginMenu("Randomizer"))
{
EnhancementCheckbox("Randomizer Settings", "gRandomizerSettingsEnabled");
customWindows["Randomizer Settings"].enabled = CVar_GetS32("gRandomizerSettingsEnabled", 0);
EnhancementCheckbox("Item Tracker", "gItemTrackerEnabled");
customWindows["Item Tracker"].enabled = CVar_GetS32("gItemTrackerEnabled", 0);
ImGui::Separator();
if (ImGui::BeginMenu("Rando Enhancements"))
{
EnhancementCheckbox("Quest Item Fanfares", "gRandoQuestItemFanfares");
Tooltip(
"Play unique fanfares when obtaining quest items\n"
"(medallions/stones/songs). Note that these fanfares\n"
"are longer than usual."
);
ImGui::EndMenu();
}
ImGui::EndMenu();
}
ImGui::EndMenuBar(); ImGui::EndMenuBar();
} }