Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
163 changes: 120 additions & 43 deletions soh/soh/SohMenuBar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ std::string GetWindowButtonText(const char* text, bool menuOpen) {
};

static const char* chestStyleMatchesContentsOptions[4] = { "Disabled", "Both", "Texture Only", "Size Only" };
static const char* uiMenuColors[9] = { "White", "Gray", "Indigo", "Red", "Dark Red", "Light Green", "Green", "Dark Green", "Yellow" };
static const char* bunnyHoodOptions[3] = { "Disabled", "Faster Run & Longer Jump", "Faster Run" };
static const char* mirroredWorldModes[9] = {
"Disabled", "Always", "Random", "Random (Seeded)", "Dungeons",
Expand Down Expand Up @@ -95,6 +96,7 @@ std::string GetWindowButtonText(const char* text, bool menuOpen) {
"OHKO"
};
static const char* timeTravelOptions[3] = { "Disabled", "Ocarina of Time", "Any Ocarina" };
static ImVec4 colorChoice;

extern "C" SaveContext gSaveContext;

Expand Down Expand Up @@ -256,6 +258,41 @@ void DrawSettingsMenu() {
UIWidgets::Spacer(0);

if (ImGui::BeginMenu("Graphics")) {
// New
UIWidgets::CVarCombobox("Menu Theme", "gMenuTheme", uiMenuColors, {
.color = colorChoice,
.tooltip = "Change the Color Theme of the Menu Bar."
});
switch (CVarGetInteger("gMenuTheme", 0)) {
case 1:
colorChoice = ImVec4(0.4f, 0.4f, 0.4f, 0.4f);
break;
case 2:
colorChoice = ImVec4(0.24f, 0.31f, 0.71f, 1.0f);
break;
case 3:
colorChoice = ImVec4(0.5f, 0.0f, 0.0f, 1.0f);
break;
case 4:
colorChoice = ImVec4(0.3f, 0.0f, 0.0f, 1.0f);
break;
case 5:
colorChoice = ImVec4(0.0f, 0.7f, 0.0f, 1.0f);
break;
case 6:
colorChoice = ImVec4(0.0f, 0.5f, 0.0f, 1.0f);
break;
case 7:
colorChoice = ImVec4(0.0f, 0.3f, 0.0f, 1.0f);
break;
case 8:
colorChoice = ImVec4(1.0f, 0.627f, 0.0f, 1.0f);
break;
default:
colorChoice = ImVec4(1.0f, 1.0f, 1.0f, 1.0f);
break;
}
// Old
#ifndef __APPLE__
if (UIWidgets::EnhancementSliderFloat("Internal Resolution: %d %%", "##IMul", "gInternalResolution", 0.5f, 2.0f, "", 1.0f, true)) {
LUS::Context::GetInstance()->GetWindow()->SetResolutionMultiplier(CVarGetFloat("gInternalResolution", 1));
Expand Down Expand Up @@ -480,6 +517,7 @@ extern std::shared_ptr<CosmeticsEditorWindow> mCosmeticsEditorWindow;
extern std::shared_ptr<GameplayStatsWindow> mGameplayStatsWindow;

void DrawEnhancementsMenu() {

if (ImGui::BeginMenu("Enhancements"))
{
DrawPresetSelector(PRESET_TYPE_ENHANCEMENTS);
Expand All @@ -490,55 +528,94 @@ void DrawEnhancementsMenu() {
{
if (ImGui::BeginMenu("Time Savers"))
{
UIWidgets::PaddedEnhancementSliderInt("Text Speed: %dx", "##TEXTSPEED", "gTextSpeed", 1, 5, "", 1, true, false, true);
UIWidgets::PaddedEnhancementCheckbox("Skip Text", "gSkipText", false, true);
UIWidgets::Tooltip("Holding down B skips text");
UIWidgets::PaddedEnhancementSliderInt("King Zora Speed: %dx", "##MWEEPSPEED", "gMweepSpeed", 1, 5, "", 1, true, false, true);
UIWidgets::PaddedEnhancementSliderInt("Biggoron Forge Time: %d days", "##FORGETIME", "gForgeTime", 0, 3, "", 3, true, false, true);
UIWidgets::Tooltip("Allows you to change the number of days it takes for Biggoron to forge the Biggoron Sword");
UIWidgets::PaddedEnhancementSliderInt("Vine/Ladder Climb speed +%d", "##CLIMBSPEED", "gClimbSpeed", 0, 12, "", 0, true, false, true);
UIWidgets::PaddedEnhancementSliderInt("Block pushing speed +%d", "##BLOCKSPEED", "gFasterBlockPush", 0, 5, "", 0, true, false, true);
UIWidgets::PaddedEnhancementCheckbox("Faster Heavy Block Lift", "gFasterHeavyBlockLift", true, false);
UIWidgets::Tooltip("Speeds up lifting silver rocks and obelisks");
UIWidgets::PaddedEnhancementCheckbox("Link as default file name", "gLinkDefaultName", true, false);
UIWidgets::Tooltip("Allows you to have \"Link\" as a premade file name");
UIWidgets::PaddedEnhancementCheckbox("No Forced Navi", "gNoForcedNavi", true, false);
UIWidgets::Tooltip("Prevent forced Navi conversations");
UIWidgets::PaddedEnhancementCheckbox("No Skulltula Freeze", "gSkulltulaFreeze", true, false);
UIWidgets::Tooltip("Stops the game from freezing the player when picking up Gold Skulltulas");
UIWidgets::PaddedEnhancementCheckbox("Fast Chests", "gFastChests", true, false);
UIWidgets::Tooltip("Kick open every chest");
UIWidgets::PaddedText("Chest size & texture matches contents", true, false);
if (UIWidgets::EnhancementCombobox("gChestSizeAndTextureMatchesContents", chestStyleMatchesContentsOptions, CSMC_DISABLED)) {
if (CVarGetInteger("gChestSizeAndTextureMatchesContents", CSMC_DISABLED) == CSMC_DISABLED) {
CVarSetInteger("gChestSizeDependsStoneOfAgony", 0);
}
}
UIWidgets::Tooltip(
"Chest sizes and textures are changed to help identify the item inside.\n"
" - Major items: Large gold chests\n"
" - Lesser items: Large brown chests\n"
" - Junk items: Small brown chests\n"
" - Small keys: Small silver chest\n"
" - Boss keys: Vanilla size and texture\n"
" - Skulltula Tokens: Small skulltula chest\n"
);
// new
UIWidgets::CVarSliderInt("Text Speed", "gTextSpeed", 1, 5, 1, {
.color = colorChoice,
.format = "%dx",
});
UIWidgets::CVarCheckbox("Skip Text", "gSkipText", {
.color = colorChoice,
.tooltip = "Holding down B skips text",
});
UIWidgets::CVarSliderInt("King Zora Speed", "gMweepSpeed", 1, 5, 1, {
.color = colorChoice,
.format = "%dx",
});
UIWidgets::CVarSliderInt("Biggoron Forge Time", "gForgeTime", 0, 3, 3, {
.color = colorChoice,
.tooltip = "Allows you to change the number of days it takes for Biggoron to forge the Biggoron Sword",
.format = "%d days"
});
UIWidgets::CVarSliderInt("Vine/Ladder Climb speed", "gClimbSpeed", 0, 12, 0, {
.color = colorChoice,
.format = "%dx",
});
UIWidgets::CVarSliderInt("Block pushing speed", "gFasterBlockPush", 0, 5, 0, {
.color = colorChoice,
.format = "%dx",
});
UIWidgets::CVarCheckbox("Faster Heavy Block Lift", "gFasterHeavyBlockLift", {
.color = colorChoice,
.tooltip = "Speeds up lifting silver rocks and obelisks",
});
UIWidgets::CVarCheckbox("Link as default file name", "gLinkDefaultName", {
.color = colorChoice,
.tooltip = "Allows you to have \"Link\" as a premade file name",
});
UIWidgets::CVarCheckbox("No Forced Navi", "gNoForcedNavi", {
.color = colorChoice,
.tooltip = "Prevent forced Navi conversations",
});
UIWidgets::CVarCheckbox("No Skulltula Freeze", "gSkulltulaFreeze", {
.color = colorChoice,
.tooltip = "Stops the game from freezing the player when picking up Gold Skulltulas",
});
UIWidgets::CVarCheckbox("Fast Chests", "gFastChests", {
.color = colorChoice,
.tooltip = "Kick open every chest",
});
UIWidgets::CVarCombobox("Chest size & texture matches contents", "gChestSizeAndTextureMatchesContents", chestStyleMatchesContentsOptions, {
.color = colorChoice,
.tooltip =
"Chest sizes and textures are changed to help identify the item inside.\n"
" - Major items: Large gold chests\n"
" - Lesser items: Large brown chests\n"
" - Junk items: Small brown chests\n"
" - Small keys: Small silver chest\n"
" - Boss keys: Vanilla size and texture\n"
" - Skulltula Tokens: Small skulltula chest\n",
.defaultIndex = CSMC_DISABLED,
});
if (CVarGetInteger("gChestSizeAndTextureMatchesContents", CSMC_DISABLED) != CSMC_DISABLED) {
UIWidgets::PaddedEnhancementCheckbox("Chests of Agony", "gChestSizeDependsStoneOfAgony", true, false);
UIWidgets::Tooltip("Only change the size/texture of chests if you have the Stone of Agony.");
UIWidgets::CVarCheckbox("Chests of Agony", "gChestSizeDependsStoneOfAgony", {
.color = colorChoice,
.tooltip = "Only change the size/texture of chests if you have the Stone of Agony.",
});
}
UIWidgets::PaddedEnhancementCheckbox("Skip Pickup Messages", "gFastDrops", true, false);
UIWidgets::Tooltip("Skip pickup messages for new consumable items and bottle swipes");
UIWidgets::PaddedEnhancementCheckbox("Ask to Equip New Items", "gAskToEquip", true, false);
UIWidgets::Tooltip("Adds a prompt to equip newly-obtained swords, shields and tunics");
UIWidgets::PaddedEnhancementCheckbox("Better Owl", "gBetterOwl", true, false);
UIWidgets::Tooltip("The default response to Kaepora Gaebora is always that you understood what he said");
UIWidgets::PaddedEnhancementCheckbox("Fast Ocarina Playback", "gFastOcarinaPlayback", true, false);
UIWidgets::CVarCheckbox("Skip Pickup Messages", "gFastDrops", {
.color = colorChoice,
.tooltip = "Only change the size/texture of chests if you have the Stone of Agony.",
});
UIWidgets::CVarCheckbox("Ask to Equip New Items", "gAskToEquip", {
.color = colorChoice,
.tooltip = "Adds a prompt to equip newly-obtained swords, shields and tunics",
});
UIWidgets::CVarCheckbox("Better Owl", "gBetterOwl", {
.color = colorChoice,
.tooltip = "The default response to Kaepora Gaebora is always that you understood what he said",
});
UIWidgets::CVarCheckbox("Fast Ocarina Playback", "gFastOcarinaPlayback", {
.color = colorChoice,
.tooltip = "Skip the part where the Ocarina playback is called when you play a song",
});
bool forceSkipScarecrow = IS_RANDO &&
OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_SKIP_SCARECROWS_SONG);
static const char* forceSkipScarecrowText =
"This setting is forcefully enabled because a savefile\nwith \"Skip Scarecrow Song\" is loaded";
UIWidgets::Tooltip("Skip the part where the Ocarina playback is called when you play a song");
// old



UIWidgets::PaddedEnhancementCheckbox("Skip Scarecrow Song", "gSkipScarecrow", true, false,
forceSkipScarecrow, forceSkipScarecrowText, UIWidgets::CheckboxGraphics::Checkmark);
UIWidgets::Tooltip("Pierre appears when Ocarina is pulled out. Requires learning scarecrow song.");
Expand Down
Loading