Mirroring last commit from part 1 in randomizer.cpp

This commit is contained in:
Malkierian 2024-04-01 14:41:01 -07:00
parent ab51cfd7b9
commit 8f92dea109
2 changed files with 4 additions and 4 deletions

View File

@ -479,7 +479,7 @@ const std::vector<const char*> randomizerCvars = {
RANDOMIZER_SEED_CVAR("ZorasFountain"),
RANDOMIZER_SEED_CVAR("Shuffle100GSReward"),
RANDOMIZER_SEED_CVAR("GregHint"),
"gRandoManualSeedEntry",
RANDOMIZER_SEED_CVAR("ManualSeedEntry"),
RANDOMIZER_SEED_CVAR("TriforceHuntTotalPieces"),
RANDOMIZER_SEED_CVAR("TriforceHuntRequiredPieces"),
RANDOMIZER_SEED_CVAR("TriforceHunt"),

View File

@ -3154,8 +3154,8 @@ void RandomizerSettingsWindow::DrawElement() {
ImGui::EndDisabled();
UIWidgets::Spacer(0);
UIWidgets::EnhancementCheckbox("Manual seed entry", "gRandoManualSeedEntry", false, "");
if (CVarGetInteger("gRandoManualSeedEntry", 0)) {
UIWidgets::EnhancementCheckbox("Manual seed entry", RANDOMIZER_SEED_CVAR("ManualSeedEntry"), false, "");
if (CVarGetInteger(RANDOMIZER_SEED_CVAR("ManualSeedEntry"), 0)) {
ImGui::Text("Seed");
ImGui::InputText("##RandomizerSeed", seedString, MAX_SEED_STRING_SIZE, ImGuiInputTextFlags_CallbackCharFilter, UIWidgets::TextFilters::FilterAlphaNum);
UIWidgets::Tooltip(
@ -3176,7 +3176,7 @@ void RandomizerSettingsWindow::DrawElement() {
UIWidgets::Spacer(0);
ImGui::BeginDisabled(CVarGetInteger(RANDOMIZER_SEED_CVAR("DontGenerateSpoiler"), 0) && gSaveContext.gameMode != GAMEMODE_FILE_SELECT);
if (ImGui::Button("Generate Randomizer")) {
GenerateRandomizer(CVarGetInteger("gRandoManualSeedEntry", 0) ? seedString : "");
GenerateRandomizer(CVarGetInteger(RANDOMIZER_SEED_CVAR("ManualSeedEntry"), 0) ? seedString : "");
}
ImGui::EndDisabled();