mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-12-23 00:28:51 -05:00
Imgui polish (#3481)
* Rearrange menus for better layout on smaller screens. * Automatically calculate +/- increments for float sliders * Add needed header * Use stringstream instead of format since apparently most platforms don't actually support all of c++20 yet boooooo * Add header that only Mac complained about for some reason * Theoretical performance improvement * Actual performance improvement
This commit is contained in:
parent
a0258f0fca
commit
01529126ba
@ -422,8 +422,8 @@ void AudioEditor::DrawElement() {
|
||||
ImGui::PopItemWidth();
|
||||
ImGui::NewLine();
|
||||
ImGui::PopItemWidth();
|
||||
UIWidgets::EnhancementSliderFloat("Link's voice pitch multiplier: %f", "##linkVoiceFreqMultiplier",
|
||||
"gLinkVoiceFreqMultiplier", 0.4, 2.5, "", 1.0, false, false);
|
||||
UIWidgets::EnhancementSliderFloat("Link's voice pitch multiplier: %.1f %%", "##linkVoiceFreqMultiplier",
|
||||
"gLinkVoiceFreqMultiplier", 0.4, 2.5, "", 1.0, true, true);
|
||||
ImGui::SameLine();
|
||||
const std::string resetButton = "Reset##linkVoiceFreqMultiplier";
|
||||
if (ImGui::Button(resetButton.c_str())) {
|
||||
|
@ -251,9 +251,9 @@ namespace GameControlEditor {
|
||||
}
|
||||
}
|
||||
if (CVarGetInteger("gEnableFirstPersonSensitivity", 0)) {
|
||||
UIWidgets::EnhancementSliderFloat("Aiming/First-Person Horizontal Sensitivity: %d %%", "##FirstPersonSensitivity Horizontal",
|
||||
UIWidgets::EnhancementSliderFloat("Aiming/First-Person Horizontal Sensitivity: %.0f %%", "##FirstPersonSensitivity Horizontal",
|
||||
"gFirstPersonCameraSensitivityX", 0.01f, 5.0f, "", 1.0f, true);
|
||||
UIWidgets::EnhancementSliderFloat("Aiming/First-Person Vertical Sensitivity: %d %%", "##FirstPersonSensitivity Vertical",
|
||||
UIWidgets::EnhancementSliderFloat("Aiming/First-Person Vertical Sensitivity: %.0f %%", "##FirstPersonSensitivity Vertical",
|
||||
"gFirstPersonCameraSensitivityY", 0.01f, 5.0f, "", 1.0f, true);
|
||||
}
|
||||
UIWidgets::Spacer(0);
|
||||
@ -270,9 +270,9 @@ namespace GameControlEditor {
|
||||
UIWidgets::PaddedEnhancementCheckbox("Invert Camera Y Axis", "gInvertYAxis", true, true, false, "", UIWidgets::CheckboxGraphics::Cross, true);
|
||||
DrawHelpIcon("Inverts the Camera Y Axis in:\n-Free camera");
|
||||
UIWidgets::Spacer(0);
|
||||
UIWidgets::PaddedEnhancementSliderFloat("Third-Person Horizontal Sensitivity: %d %%", "##ThirdPersonSensitivity Horizontal",
|
||||
UIWidgets::PaddedEnhancementSliderFloat("Third-Person Horizontal Sensitivity: %.0f %%", "##ThirdPersonSensitivity Horizontal",
|
||||
"gThirdPersonCameraSensitivityX", 0.01f, 5.0f, "", 1.0f, true, true, false, true);
|
||||
UIWidgets::PaddedEnhancementSliderFloat("Third-Person Vertical Sensitivity: %d %%", "##ThirdPersonSensitivity Vertical",
|
||||
UIWidgets::PaddedEnhancementSliderFloat("Third-Person Vertical Sensitivity: %.0f %%", "##ThirdPersonSensitivity Vertical",
|
||||
"gThirdPersonCameraSensitivityY", 0.01f, 5.0f, "", 1.0f, true, true, false, true);
|
||||
UIWidgets::PaddedEnhancementSliderInt("Camera Distance: %d", "##CamDist",
|
||||
"gFreeCameraDistMax", 100, 900, "", 185, true, false, true);
|
||||
@ -322,8 +322,8 @@ namespace GameControlEditor {
|
||||
window->BeginGroupPanelPublic("Walk Modifier", ImGui::GetContentRegionAvail());
|
||||
UIWidgets::PaddedEnhancementCheckbox("Toggle modifier instead of holding", "gWalkSpeedToggle", true, false);
|
||||
UIWidgets::PaddedEnhancementCheckbox("Don't affect jump distance/velocity", "gWalkModifierDoesntChangeJump", true, false);
|
||||
UIWidgets::PaddedEnhancementSliderFloat("Modifier 1: %d %%", "##WalkMod1", "gWalkModifierOne", 0.0f, 5.0f, "", 1.0f, true, true, false, true);
|
||||
UIWidgets::PaddedEnhancementSliderFloat("Modifier 2: %d %%", "##WalkMod2", "gWalkModifierTwo", 0.0f, 5.0f, "", 1.0f, true, true, false, true);
|
||||
UIWidgets::PaddedEnhancementSliderFloat("Modifier 1: %.0f %%", "##WalkMod1", "gWalkModifierOne", 0.0f, 5.0f, "", 1.0f, true, true, false, true);
|
||||
UIWidgets::PaddedEnhancementSliderFloat("Modifier 2: %.0f %%", "##WalkMod2", "gWalkModifierTwo", 0.0f, 5.0f, "", 1.0f, true, true, false, true);
|
||||
window->EndGroupPanelPublic(0);
|
||||
}
|
||||
ImGui::EndDisabled();
|
||||
|
@ -1085,7 +1085,7 @@ void SohInputEditorWindow::DrawLEDSection(uint8_t port) {
|
||||
ImGui::SameLine();
|
||||
ImGui::Text("Custom Color");
|
||||
}
|
||||
UIWidgets::PaddedEnhancementSliderFloat("Brightness: %d%%", "##LED_Brightness", "gLedBrightness", 0.0f,
|
||||
UIWidgets::PaddedEnhancementSliderFloat("Brightness: %.1f %%", "##LED_Brightness", "gLedBrightness", 0.0f,
|
||||
1.0f, "", 1.0f, true, true);
|
||||
DrawHelpIcon("Sets the brightness of controller LEDs. 0% brightness = LEDs off.");
|
||||
UIWidgets::PaddedEnhancementCheckbox(
|
||||
|
@ -1491,7 +1491,7 @@ void DrawSillyTab() {
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
}
|
||||
}
|
||||
if (UIWidgets::EnhancementSliderFloat("Link Body Scale: %f", "##Link_BodyScale", "gCosmetics.Link_BodyScale.Value", 0.001f, 0.025f, "", 0.01f, true)) {
|
||||
if (UIWidgets::EnhancementSliderFloat("Link Body Scale: %.3fx", "##Link_BodyScale", "gCosmetics.Link_BodyScale.Value", 0.001f, 0.025f, "", 0.01f, true)) {
|
||||
CVarSetInteger("gCosmetics.Link_BodyScale.Changed", 1);
|
||||
}
|
||||
ImGui::SameLine();
|
||||
@ -1506,7 +1506,7 @@ void DrawSillyTab() {
|
||||
player->actor.scale.z = 0.01f;
|
||||
}
|
||||
}
|
||||
if (UIWidgets::EnhancementSliderFloat("Link Head Scale: %f", "##Link_HeadScale", "gCosmetics.Link_HeadScale.Value", 0.4f, 4.0f, "", 1.0f, false)) {
|
||||
if (UIWidgets::EnhancementSliderFloat("Link Head Scale: %.2fx", "##Link_HeadScale", "gCosmetics.Link_HeadScale.Value", 0.4f, 4.0f, "", 1.0f, false)) {
|
||||
CVarSetInteger("gCosmetics.Link_HeadScale.Changed", 1);
|
||||
}
|
||||
ImGui::SameLine();
|
||||
@ -1515,7 +1515,7 @@ void DrawSillyTab() {
|
||||
CVarClear("gCosmetics.Link_HeadScale.Changed");
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
}
|
||||
if (UIWidgets::EnhancementSliderFloat("Link Sword Scale: %f", "##Link_SwordScale", "gCosmetics.Link_SwordScale.Value", 1.0f, 2.5f, "", 1.0f, false)) {
|
||||
if (UIWidgets::EnhancementSliderFloat("Link Sword Scale: %.3fx", "##Link_SwordScale", "gCosmetics.Link_SwordScale.Value", 1.0f, 2.5f, "", 1.0f, false)) {
|
||||
CVarSetInteger("gCosmetics.Link_SwordScale.Changed", 1);
|
||||
}
|
||||
ImGui::SameLine();
|
||||
@ -1524,44 +1524,44 @@ void DrawSillyTab() {
|
||||
CVarClear("gCosmetics.Link_SwordScale.Changed");
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
}
|
||||
UIWidgets::EnhancementSliderFloat("Bunny Hood Length: %f", "##BunnyHood_EarLength", "gCosmetics.BunnyHood_EarLength", -300.0f, 1000.0f, "", 0.0f, false);
|
||||
UIWidgets::EnhancementSliderFloat("Bunny Hood Length: %.0f", "##BunnyHood_EarLength", "gCosmetics.BunnyHood_EarLength", -300.0f, 1000.0f, "", 0.0f, false);
|
||||
ImGui::SameLine();
|
||||
if (ImGui::Button("Reset##BunnyHood_EarLength")) {
|
||||
CVarClear("gCosmetics.BunnyHood_EarLength");
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
}
|
||||
UIWidgets::EnhancementSliderFloat("Bunny Hood Spread: %f", "##BunnyHood_EarSpread", "gCosmetics.BunnyHood_EarSpread", -300.0f, 500.0f, "", 0.0f, false);
|
||||
UIWidgets::EnhancementSliderFloat("Bunny Hood Spread: %.0f", "##BunnyHood_EarSpread", "gCosmetics.BunnyHood_EarSpread", -300.0f, 500.0f, "", 0.0f, false);
|
||||
ImGui::SameLine();
|
||||
if (ImGui::Button("Reset##BunnyHood_EarSpread")) {
|
||||
CVarClear("gCosmetics.BunnyHood_EarSpread");
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
}
|
||||
UIWidgets::EnhancementSliderFloat("Goron Neck Length: %f", "##Goron_NeckLength", "gCosmetics.Goron_NeckLength", 0.0f, 5000.0f, "", 0.0f, false);
|
||||
UIWidgets::EnhancementSliderFloat("Goron Neck Length: %.0f", "##Goron_NeckLength", "gCosmetics.Goron_NeckLength", 0.0f, 5000.0f, "", 0.0f, false);
|
||||
ImGui::SameLine();
|
||||
if (ImGui::Button("Reset##Goron_NeckLength")) {
|
||||
CVarClear("gCosmetics.Goron_NeckLength");
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
}
|
||||
UIWidgets::EnhancementCheckbox("Unfix Goron Spin", "gUnfixGoronSpin");
|
||||
UIWidgets::EnhancementSliderFloat("Fairies Size: %f", "##Fairies_Size", "gCosmetics.Fairies_Size", 0.25f, 5.0f, "", 1.0f, false);
|
||||
UIWidgets::EnhancementSliderFloat("Fairies Size: %.2fx", "##Fairies_Size", "gCosmetics.Fairies_Size", 0.25f, 5.0f, "", 1.0f, false);
|
||||
ImGui::SameLine();
|
||||
if (ImGui::Button("Reset##Fairies_Size")) {
|
||||
CVarClear("gCosmetics.Fairies_Size");
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
}
|
||||
UIWidgets::EnhancementSliderFloat("N64 Logo Spin Speed: %f", "##N64Logo_SpinSpeed", "gCosmetics.N64Logo_SpinSpeed", 0.25f, 5.0f, "", 1.0f, false);
|
||||
UIWidgets::EnhancementSliderFloat("N64 Logo Spin Speed: %.2fx", "##N64Logo_SpinSpeed", "gCosmetics.N64Logo_SpinSpeed", 0.25f, 5.0f, "", 1.0f, false);
|
||||
ImGui::SameLine();
|
||||
if (ImGui::Button("Reset##N64Logo_SpinSpeed")) {
|
||||
CVarClear("gCosmetics.N64Logo_SpinSpeed");
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
}
|
||||
UIWidgets::EnhancementSliderFloat("Moon Size: %f", "##Moon_Size", "gCosmetics.Moon_Size", 0.5f, 2.0f, "", 1.0f, false);
|
||||
UIWidgets::EnhancementSliderFloat("Moon Size: %.1f %%", "##Moon_Size", "gCosmetics.Moon_Size", 0.5f, 2.0f, "", 1.0f, true);
|
||||
ImGui::SameLine();
|
||||
if (ImGui::Button("Reset##Moon_Size")) {
|
||||
CVarClear("gCosmetics.Moon_Size");
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
}
|
||||
if (UIWidgets::EnhancementSliderFloat("Kak Windmill Speed: %f", "##Kak_Windmill_Speed", "gCosmetics.Kak_Windmill_Speed.Value", 100.0f, 6000.0f, "", 100.0f, false)) {
|
||||
if (UIWidgets::EnhancementSliderFloat("Kak Windmill Speed: %.0f", "##Kak_Windmill_Speed", "gCosmetics.Kak_Windmill_Speed.Value", 100.0f, 6000.0f, "", 100.0f, false)) {
|
||||
CVarSetInteger("gCosmetics.Kak_Windmill_Speed.Changed", 1);
|
||||
}
|
||||
ImGui::SameLine();
|
||||
@ -1793,7 +1793,7 @@ void CosmeticsEditorWindow::DrawElement() {
|
||||
}
|
||||
}
|
||||
UIWidgets::EnhancementCheckbox("Sync Rainbow colors", "gCosmetics.RainbowSync");
|
||||
UIWidgets::EnhancementSliderFloat("Rainbow Speed: %f", "##rainbowSpeed", "gCosmetics.RainbowSpeed", 0.03f, 1.0f, "", 0.6f, false);
|
||||
UIWidgets::EnhancementSliderFloat("Rainbow Speed: %.3f", "##rainbowSpeed", "gCosmetics.RainbowSpeed", 0.03f, 1.0f, "", 0.6f, false, true);
|
||||
if (ImGui::Button("Randomize All", ImVec2(ImGui::GetContentRegionAvail().x / 2, 30.0f))) {
|
||||
for (auto& [id, cosmeticOption] : cosmeticOptions) {
|
||||
if (!CVarGetInteger(cosmeticOption.lockedCvar, 0) && (!cosmeticOption.advancedOption || CVarGetInteger("gCosmetics.AdvancedMode", 0))) {
|
||||
|
@ -187,17 +187,17 @@ void DrawSettingsMenu() {
|
||||
if (ImGui::BeginMenu("Settings"))
|
||||
{
|
||||
if (ImGui::BeginMenu("Audio")) {
|
||||
UIWidgets::PaddedEnhancementSliderFloat("Master Volume: %d %%", "##Master_Vol", "gGameMasterVolume", 0.0f, 1.0f, "", 1.0f, true, true, false, true);
|
||||
if (UIWidgets::PaddedEnhancementSliderFloat("Main Music Volume: %d %%", "##Main_Music_Vol", "gMainMusicVolume", 0.0f, 1.0f, "", 1.0f, true, true, false, true)) {
|
||||
UIWidgets::PaddedEnhancementSliderFloat("Master Volume: %.1f %%", "##Master_Vol", "gGameMasterVolume", 0.0f, 1.0f, "", 1.0f, true, true, false, true);
|
||||
if (UIWidgets::PaddedEnhancementSliderFloat("Main Music Volume: %.1f %%", "##Main_Music_Vol", "gMainMusicVolume", 0.0f, 1.0f, "", 1.0f, true, true, false, true)) {
|
||||
Audio_SetGameVolume(SEQ_BGM_MAIN, CVarGetFloat("gMainMusicVolume", 1.0f));
|
||||
}
|
||||
if (UIWidgets::PaddedEnhancementSliderFloat("Sub Music Volume: %d %%", "##Sub_Music_Vol", "gSubMusicVolume", 0.0f, 1.0f, "", 1.0f, true, true, false, true)) {
|
||||
if (UIWidgets::PaddedEnhancementSliderFloat("Sub Music Volume: %.1f %%", "##Sub_Music_Vol", "gSubMusicVolume", 0.0f, 1.0f, "", 1.0f, true, true, false, true)) {
|
||||
Audio_SetGameVolume(SEQ_BGM_SUB, CVarGetFloat("gSubMusicVolume", 1.0f));
|
||||
}
|
||||
if (UIWidgets::PaddedEnhancementSliderFloat("Sound Effects Volume: %d %%", "##Sound_Effect_Vol", "gSFXMusicVolume", 0.0f, 1.0f, "", 1.0f, true, true, false, true)) {
|
||||
if (UIWidgets::PaddedEnhancementSliderFloat("Sound Effects Volume: %.1f %%", "##Sound_Effect_Vol", "gSFXMusicVolume", 0.0f, 1.0f, "", 1.0f, true, true, false, true)) {
|
||||
Audio_SetGameVolume(SEQ_SFX, CVarGetFloat("gSFXMusicVolume", 1.0f));
|
||||
}
|
||||
if (UIWidgets::PaddedEnhancementSliderFloat("Fanfare Volume: %d %%", "##Fanfare_Vol", "gFanfareVolume", 0.0f, 1.0f, "", 1.0f, true, true, false, true)) {
|
||||
if (UIWidgets::PaddedEnhancementSliderFloat("Fanfare Volume: %.1f %%", "##Fanfare_Vol", "gFanfareVolume", 0.0f, 1.0f, "", 1.0f, true, true, false, true)) {
|
||||
Audio_SetGameVolume(SEQ_FANFARE, CVarGetFloat("gFanfareVolume", 1.0f));
|
||||
}
|
||||
|
||||
@ -255,7 +255,7 @@ void DrawSettingsMenu() {
|
||||
#endif
|
||||
UIWidgets::PaddedEnhancementCheckbox("Show Inputs", "gInputEnabled", true, false);
|
||||
UIWidgets::Tooltip("Shows currently pressed inputs on the bottom right of the screen");
|
||||
UIWidgets::PaddedEnhancementSliderFloat("Input Scale: %.1f", "##Input", "gInputScale", 1.0f, 3.0f, "", 1.0f, false, true, true, false);
|
||||
UIWidgets::PaddedEnhancementSliderFloat("Input Scale: %.2f", "##Input", "gInputScale", 1.0f, 3.0f, "", 1.0f, false, true, true, false);
|
||||
UIWidgets::Tooltip("Sets the on screen size of the displayed inputs from the Show Inputs setting");
|
||||
UIWidgets::PaddedEnhancementSliderInt("Simulated Input Lag: %d frames", "##SimulatedInputLag", "gSimulatedInputLag", 0, 6, "", 0, true, true, false);
|
||||
UIWidgets::Tooltip("Buffers your inputs to be executed a specified amount of frames later");
|
||||
@ -269,7 +269,7 @@ void DrawSettingsMenu() {
|
||||
#ifndef __APPLE__
|
||||
const bool disabled_resolutionSlider = CVarGetInteger("gAdvancedResolution.VerticalResolutionToggle", 0) &&
|
||||
CVarGetInteger("gAdvancedResolution.Enabled", 0);
|
||||
if (UIWidgets::EnhancementSliderFloat("Internal Resolution: %d %%", "##IMul", "gInternalResolution", 0.5f,
|
||||
if (UIWidgets::EnhancementSliderFloat("Internal Resolution: %.1f %%", "##IMul", "gInternalResolution", 0.5f,
|
||||
2.0f, "", 1.0f, true, true, disabled_resolutionSlider)) {
|
||||
LUS::Context::GetInstance()->GetWindow()->SetResolutionMultiplier(CVarGetFloat("gInternalResolution", 1));
|
||||
}
|
||||
@ -527,22 +527,58 @@ void DrawEnhancementsMenu() {
|
||||
{
|
||||
if (ImGui::BeginMenu("Time Savers"))
|
||||
{
|
||||
ImGui::SetCursorPosY(ImGui::GetCursorPosY() - 8.0f);
|
||||
ImGui::BeginTable("##timeSaversMenu", 2, ImGuiTableFlags_SizingFixedFit);
|
||||
ImGui::TableSetupColumn("", ImGuiTableColumnFlags_WidthStretch);
|
||||
ImGui::TableSetupColumn("", ImGuiTableColumnFlags_WidthStretch);
|
||||
ImGui::TableNextColumn();
|
||||
UIWidgets::Spacer(0);
|
||||
ImGui::Text("Speed-ups:");
|
||||
UIWidgets::PaddedSeparator();
|
||||
|
||||
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::PaddedEnhancementCheckbox("Faster Heavy Block Lift", "gFasterHeavyBlockLift", false, 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("Skip Pickup Messages", "gFastDrops", true, false);
|
||||
UIWidgets::Tooltip("Skip pickup messages for new consumable items and bottle swipes");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Fast Ocarina Playback", "gFastOcarinaPlayback", true, false);
|
||||
UIWidgets::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::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.");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Skip Magic Arrow Equip Animation", "gSkipArrowAnimation", true, false);
|
||||
UIWidgets::PaddedEnhancementCheckbox("Skip save confirmation", "gSkipSaveConfirmation", true, false);
|
||||
UIWidgets::Tooltip("Skip the \"Game saved.\" confirmation screen");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Faster Farore's Wind", "gFastFarores", true, false);
|
||||
UIWidgets::Tooltip("Greatly decreases cast time of Farore's Wind magic spell.");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Skip water take breath animation", "gSkipSwimDeepEndAnim", true, false);
|
||||
UIWidgets::Tooltip("Skips Link's taking breath animation after coming up from water. This setting does not interfere with getting items from underwater.");
|
||||
|
||||
ImGui::TableNextColumn();
|
||||
UIWidgets::Spacer(0);
|
||||
ImGui::Text("Changes:");
|
||||
UIWidgets::PaddedSeparator();
|
||||
|
||||
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::PaddedEnhancementCheckbox("Remember Save Location", "gRememberSaveLocation", false, false);
|
||||
UIWidgets::Tooltip("When loading a save, places Link at the last entrance he went through.\n"
|
||||
"This doesn't work if the save was made in a grotto.");
|
||||
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("Nighttime GS Always Spawn", "gNightGSAlwaysSpawn", true, false);
|
||||
UIWidgets::Tooltip("Nighttime Skulltulas will spawn during both day and night.");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Dampe Appears All Night", "gDampeAllNight", true, false);
|
||||
UIWidgets::Tooltip("Makes Dampe appear anytime during the night, not just his usual working hours.");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Fast Chests", "gFastChests", true, false);
|
||||
UIWidgets::Tooltip("Kick open every chest");
|
||||
UIWidgets::PaddedText("Chest size & texture matches contents", true, false);
|
||||
@ -566,36 +602,14 @@ void DrawEnhancementsMenu() {
|
||||
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::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);
|
||||
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");
|
||||
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.");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Remember Save Location", "gRememberSaveLocation", true, false);
|
||||
UIWidgets::Tooltip("When loading a save, places Link at the last entrance he went through.\n"
|
||||
"This doesn't work if the save was made in a grotto.");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Skip Magic Arrow Equip Animation", "gSkipArrowAnimation", true, false);
|
||||
UIWidgets::PaddedEnhancementCheckbox("Skip save confirmation", "gSkipSaveConfirmation", true, false);
|
||||
UIWidgets::Tooltip("Skip the \"Game saved.\" confirmation screen");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Exit Market at Night", "gMarketSneak", true, false);
|
||||
UIWidgets::Tooltip("Allows exiting Hyrule Castle Market Town to Hyrule Field at night by speaking "
|
||||
"to the guard next to the gate.");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Faster Farore's Wind", "gFastFarores", true, false);
|
||||
UIWidgets::Tooltip("Greatly decreases cast time of Farore's Wind magic spell.");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Nighttime GS Always Spawn", "gNightGSAlwaysSpawn", true, false);
|
||||
UIWidgets::Tooltip("Nighttime Skulltulas will spawn during both day and night.");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Dampe Appears All Night", "gDampeAllNight", true, false);
|
||||
UIWidgets::Tooltip("Makes Dampe appear anytime during the night, not just his usual working hours.");
|
||||
UIWidgets::Tooltip("Allows exiting Hyrule Castle Market Town to Hyrule Field at night by speaking to the guard next to the gate.");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Link as default file name", "gLinkDefaultName", true, false);
|
||||
UIWidgets::Tooltip("Allows you to have \"Link\" as a premade file name");
|
||||
UIWidgets::PaddedText("Time Travel with the Song of Time", true, false);
|
||||
UIWidgets::EnhancementCombobox("gTimeTravel", timeTravelOptions, 0);
|
||||
UIWidgets::Tooltip("Allows Link to freely change age by playing the Song of Time.\n"
|
||||
@ -606,8 +620,8 @@ void DrawEnhancementsMenu() {
|
||||
"- Obtained the Master Sword\n"
|
||||
"- Not within range of Time Block\n"
|
||||
"- Not within range of Ocarina playing spots");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Skip water take breath animation", "gSkipSwimDeepEndAnim", true, false);
|
||||
UIWidgets::Tooltip("Skips Link's taking breath animation after coming up from water. This setting does not interfere with getting items from underwater.");
|
||||
|
||||
ImGui::EndTable();
|
||||
ImGui::EndMenu();
|
||||
}
|
||||
|
||||
@ -660,83 +674,6 @@ void DrawEnhancementsMenu() {
|
||||
|
||||
if (ImGui::BeginMenu("Difficulty Options"))
|
||||
{
|
||||
UIWidgets::PaddedEnhancementCheckbox("Delete File On Death", "gDeleteFileOnDeath", true, false);
|
||||
ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(1.0f, 0.0f, 0.0f, 1.0f));
|
||||
UIWidgets::Tooltip("Dying will delete your file\n\n " ICON_FA_EXCLAMATION_TRIANGLE " WARNING " ICON_FA_EXCLAMATION_TRIANGLE "\nTHIS IS NOT REVERSABLE\nUSE AT YOUR OWN RISK!");
|
||||
ImGui::PopStyleColor();
|
||||
if (UIWidgets::PaddedEnhancementCheckbox("Permanent heart loss", "gPermanentHeartLoss", true, false)) {
|
||||
UpdatePermanentHeartLossState();
|
||||
}
|
||||
UIWidgets::Tooltip("When you lose 4 quarters of a heart you will permanently lose that heart container.\n\nDisabling this after the fact will restore your heart containers.");
|
||||
ImGui::Text("Damage Multiplier");
|
||||
UIWidgets::EnhancementCombobox("gDamageMul", allPowers, 0);
|
||||
UIWidgets::Tooltip(
|
||||
"Modifies all sources of damage not affected by other sliders\n"
|
||||
"2x: Can survive all common attacks from the start of the game\n"
|
||||
"4x: Dies in 1 hit to any substantial attack from the start of the game\n"
|
||||
"8x: Can only survive trivial damage from the start of the game\n"
|
||||
"16x: Can survive all common attacks with max health without double defense\n"
|
||||
"32x: Can survive all common attacks with max health and double defense\n"
|
||||
"64x: Can survive trivial damage with max health without double defense\n"
|
||||
"128x: Can survive trivial damage with max health and double defense\n"
|
||||
"256x: Cannot survive damage"
|
||||
);
|
||||
UIWidgets::PaddedText("Fall Damage Multiplier", true, false);
|
||||
UIWidgets::EnhancementCombobox("gFallDamageMul", subPowers, 0);
|
||||
UIWidgets::Tooltip(
|
||||
"Modifies all fall damage\n"
|
||||
"2x: Can survive all fall damage from the start of the game\n"
|
||||
"4x: Can only survive short fall damage from the start of the game\n"
|
||||
"8x: Cannot survive any fall damage from the start of the game\n"
|
||||
"16x: Can survive all fall damage with max health without double defense\n"
|
||||
"32x: Can survive all fall damage with max health and double defense\n"
|
||||
"64x: Can survive short fall damage with double defense\n"
|
||||
"128x: Cannot survive fall damage"
|
||||
);
|
||||
UIWidgets::PaddedText("Void Damage Multiplier", true, false);
|
||||
UIWidgets::EnhancementCombobox("gVoidDamageMul", subSubPowers, 0);
|
||||
UIWidgets::Tooltip(
|
||||
"Modifies damage taken after falling into a void\n"
|
||||
"2x: Can survive void damage from the start of the game\n"
|
||||
"4x: Cannot survive void damage from the start of the game\n"
|
||||
"8x: Can survive void damage twice with max health without double defense\n"
|
||||
"16x: Can survive void damage with max health without double defense\n"
|
||||
"32x: Can survive void damage with max health and double defense\n"
|
||||
"64x: Cannot survive void damage"
|
||||
);
|
||||
UIWidgets::PaddedText("Bonk Damage Multiplier", true, false);
|
||||
UIWidgets::EnhancementCombobox("gBonkDamageMul", bonkDamageValues, BONK_DAMAGE_NONE);
|
||||
UIWidgets::Tooltip("Modifies damage taken after bonking.");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Spawn with full health", "gFullHealthSpawn", true, false);
|
||||
UIWidgets::Tooltip("Respawn with full health instead of 3 Hearts");
|
||||
UIWidgets::PaddedEnhancementCheckbox("No Random Drops", "gNoRandomDrops", true, false);
|
||||
UIWidgets::Tooltip("Disables random drops, except from the Goron Pot, Dampe, and bosses");
|
||||
bool forceEnableBombchuDrops = IS_RANDO &&
|
||||
OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_ENABLE_BOMBCHU_DROPS) == 1;
|
||||
static const char* forceEnableBombchuDropsText =
|
||||
"This setting is forcefully enabled because a savefile\nwith \"Enable Bombchu Drops\" is loaded.";
|
||||
UIWidgets::PaddedEnhancementCheckbox("Enable Bombchu Drops", "gBombchuDrops", true, false,
|
||||
forceEnableBombchuDrops, forceEnableBombchuDropsText, UIWidgets::CheckboxGraphics::Checkmark);
|
||||
UIWidgets::Tooltip("Bombchus will sometimes drop in place of bombs");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Trees Drop Sticks", "gTreeStickDrops", true, false);
|
||||
UIWidgets::Tooltip("Bonking into trees will have a chance to drop up to 3 sticks. Must already have obtained sticks.");
|
||||
UIWidgets::PaddedEnhancementCheckbox("No Heart Drops", "gNoHeartDrops", true, false);
|
||||
UIWidgets::Tooltip("Disables heart drops, but not heart placements, like from a Deku Scrub running off\nThis simulates Hero Mode from other games in the series");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Hyper Bosses", "gHyperBosses", true, false);
|
||||
UIWidgets::Tooltip("All major bosses move and act twice as fast.");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Hyper Enemies", "gHyperEnemies", true, false);
|
||||
UIWidgets::Tooltip("All regular enemies and mini-bosses move and act twice as fast.");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Always Win Goron Pot", "gGoronPot", true, false);
|
||||
UIWidgets::Tooltip("Always get the heart piece/purple rupee from the spinning Goron pot");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Always Win Dampe Digging Game", "gDampeWin", true, false, SaveManager::Instance->IsRandoFile(),
|
||||
"This setting is always enabled in randomizer files", UIWidgets::CheckboxGraphics::Checkmark);
|
||||
UIWidgets::Tooltip("Always win the heart piece/purple rupee on the first dig in Dampe's grave digging game, just like in rando\nIn a rando file, this is unconditionally enabled");
|
||||
UIWidgets::PaddedEnhancementCheckbox("All Dogs are Richard", "gAllDogsRichard", true, false);
|
||||
UIWidgets::Tooltip("All dogs can be traded in and will count as Richard.");
|
||||
UIWidgets::PaddedEnhancementSliderInt("Cuccos Stay Put Multiplier: %dx", "##CuccoStayDurationMultiplier", "gCuccoStayDurationMultiplier", 1, 5, "", 1, true, true, false);
|
||||
UIWidgets::Tooltip("Cuccos will stay in place longer after putting them down, by a multiple of the value of the slider.");
|
||||
UIWidgets::Spacer(0);
|
||||
|
||||
if (ImGui::BeginMenu("Potion Values"))
|
||||
{
|
||||
UIWidgets::EnhancementCheckbox("Change Red Potion Effect", "gRedPotionEffect");
|
||||
@ -878,6 +815,84 @@ void DrawEnhancementsMenu() {
|
||||
ImGui::EndMenu();
|
||||
}
|
||||
|
||||
UIWidgets::Spacer(0);
|
||||
|
||||
UIWidgets::PaddedEnhancementCheckbox("Delete File On Death", "gDeleteFileOnDeath", true, false);
|
||||
ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(1.0f, 0.0f, 0.0f, 1.0f));
|
||||
UIWidgets::Tooltip("Dying will delete your file\n\n " ICON_FA_EXCLAMATION_TRIANGLE " WARNING " ICON_FA_EXCLAMATION_TRIANGLE "\nTHIS IS NOT REVERSABLE\nUSE AT YOUR OWN RISK!");
|
||||
ImGui::PopStyleColor();
|
||||
if (UIWidgets::PaddedEnhancementCheckbox("Permanent heart loss", "gPermanentHeartLoss", true, false)) {
|
||||
UpdatePermanentHeartLossState();
|
||||
}
|
||||
UIWidgets::Tooltip("When you lose 4 quarters of a heart you will permanently lose that heart container.\n\nDisabling this after the fact will restore your heart containers.");
|
||||
ImGui::Text("Damage Multiplier");
|
||||
UIWidgets::EnhancementCombobox("gDamageMul", allPowers, 0);
|
||||
UIWidgets::Tooltip(
|
||||
"Modifies all sources of damage not affected by other sliders\n"
|
||||
"2x: Can survive all common attacks from the start of the game\n"
|
||||
"4x: Dies in 1 hit to any substantial attack from the start of the game\n"
|
||||
"8x: Can only survive trivial damage from the start of the game\n"
|
||||
"16x: Can survive all common attacks with max health without double defense\n"
|
||||
"32x: Can survive all common attacks with max health and double defense\n"
|
||||
"64x: Can survive trivial damage with max health without double defense\n"
|
||||
"128x: Can survive trivial damage with max health and double defense\n"
|
||||
"256x: Cannot survive damage"
|
||||
);
|
||||
UIWidgets::PaddedText("Fall Damage Multiplier", true, false);
|
||||
UIWidgets::EnhancementCombobox("gFallDamageMul", subPowers, 0);
|
||||
UIWidgets::Tooltip(
|
||||
"Modifies all fall damage\n"
|
||||
"2x: Can survive all fall damage from the start of the game\n"
|
||||
"4x: Can only survive short fall damage from the start of the game\n"
|
||||
"8x: Cannot survive any fall damage from the start of the game\n"
|
||||
"16x: Can survive all fall damage with max health without double defense\n"
|
||||
"32x: Can survive all fall damage with max health and double defense\n"
|
||||
"64x: Can survive short fall damage with double defense\n"
|
||||
"128x: Cannot survive fall damage"
|
||||
);
|
||||
UIWidgets::PaddedText("Void Damage Multiplier", true, false);
|
||||
UIWidgets::EnhancementCombobox("gVoidDamageMul", subSubPowers, 0);
|
||||
UIWidgets::Tooltip(
|
||||
"Modifies damage taken after falling into a void\n"
|
||||
"2x: Can survive void damage from the start of the game\n"
|
||||
"4x: Cannot survive void damage from the start of the game\n"
|
||||
"8x: Can survive void damage twice with max health without double defense\n"
|
||||
"16x: Can survive void damage with max health without double defense\n"
|
||||
"32x: Can survive void damage with max health and double defense\n"
|
||||
"64x: Cannot survive void damage"
|
||||
);
|
||||
UIWidgets::PaddedText("Bonk Damage Multiplier", true, false);
|
||||
UIWidgets::EnhancementCombobox("gBonkDamageMul", bonkDamageValues, BONK_DAMAGE_NONE);
|
||||
UIWidgets::Tooltip("Modifies damage taken after bonking.");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Spawn with full health", "gFullHealthSpawn", true, false);
|
||||
UIWidgets::Tooltip("Respawn with full health instead of 3 Hearts");
|
||||
UIWidgets::PaddedEnhancementCheckbox("No Random Drops", "gNoRandomDrops", true, false);
|
||||
UIWidgets::Tooltip("Disables random drops, except from the Goron Pot, Dampe, and bosses");
|
||||
bool forceEnableBombchuDrops = IS_RANDO &&
|
||||
OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_ENABLE_BOMBCHU_DROPS) == 1;
|
||||
static const char* forceEnableBombchuDropsText =
|
||||
"This setting is forcefully enabled because a savefile\nwith \"Enable Bombchu Drops\" is loaded.";
|
||||
UIWidgets::PaddedEnhancementCheckbox("Enable Bombchu Drops", "gBombchuDrops", true, false,
|
||||
forceEnableBombchuDrops, forceEnableBombchuDropsText, UIWidgets::CheckboxGraphics::Checkmark);
|
||||
UIWidgets::Tooltip("Bombchus will sometimes drop in place of bombs");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Trees Drop Sticks", "gTreeStickDrops", true, false);
|
||||
UIWidgets::Tooltip("Bonking into trees will have a chance to drop up to 3 sticks. Must already have obtained sticks.");
|
||||
UIWidgets::PaddedEnhancementCheckbox("No Heart Drops", "gNoHeartDrops", true, false);
|
||||
UIWidgets::Tooltip("Disables heart drops, but not heart placements, like from a Deku Scrub running off\nThis simulates Hero Mode from other games in the series");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Hyper Bosses", "gHyperBosses", true, false);
|
||||
UIWidgets::Tooltip("All major bosses move and act twice as fast.");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Hyper Enemies", "gHyperEnemies", true, false);
|
||||
UIWidgets::Tooltip("All regular enemies and mini-bosses move and act twice as fast.");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Always Win Goron Pot", "gGoronPot", true, false);
|
||||
UIWidgets::Tooltip("Always get the heart piece/purple rupee from the spinning Goron pot");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Always Win Dampe Digging Game", "gDampeWin", true, false, SaveManager::Instance->IsRandoFile(),
|
||||
"This setting is always enabled in randomizer files", UIWidgets::CheckboxGraphics::Checkmark);
|
||||
UIWidgets::Tooltip("Always win the heart piece/purple rupee on the first dig in Dampe's grave digging game, just like in rando\nIn a rando file, this is unconditionally enabled");
|
||||
UIWidgets::PaddedEnhancementCheckbox("All Dogs are Richard", "gAllDogsRichard", true, false);
|
||||
UIWidgets::Tooltip("All dogs can be traded in and will count as Richard.");
|
||||
UIWidgets::PaddedEnhancementSliderInt("Cuccos Stay Put Multiplier: %dx", "##CuccoStayDurationMultiplier", "gCuccoStayDurationMultiplier", 1, 5, "", 1, true, true, false);
|
||||
UIWidgets::Tooltip("Cuccos will stay in place longer after putting them down, by a multiple of the value of the slider.");
|
||||
|
||||
ImGui::EndMenu();
|
||||
}
|
||||
|
||||
@ -970,37 +985,9 @@ void DrawEnhancementsMenu() {
|
||||
|
||||
ImGui::EndMenu();
|
||||
}
|
||||
UIWidgets::PaddedEnhancementCheckbox("Disable LOD", "gDisableLOD", true, false);
|
||||
UIWidgets::Tooltip("Turns off the Level of Detail setting, making models use their higher-poly variants at any distance");
|
||||
if (UIWidgets::PaddedEnhancementCheckbox("Disable Draw Distance", "gDisableDrawDistance", true, false)) {
|
||||
if (CVarGetInteger("gDisableDrawDistance", 0) == 0) {
|
||||
CVarSetInteger("gDisableKokiriDrawDistance", 0);
|
||||
}
|
||||
}
|
||||
UIWidgets::Tooltip("Turns off the objects draw distance, making objects being visible from a longer range");
|
||||
if (CVarGetInteger("gDisableDrawDistance", 0) == 1) {
|
||||
UIWidgets::PaddedEnhancementCheckbox("Kokiri Draw Distance", "gDisableKokiriDrawDistance", true, false);
|
||||
UIWidgets::Tooltip("The Kokiri are mystical beings that fade into view when approached\nEnabling this will remove their draw distance");
|
||||
}
|
||||
UIWidgets::PaddedEnhancementCheckbox("N64 Mode", "gLowResMode", true, false);
|
||||
UIWidgets::Tooltip("Sets aspect ratio to 4:3 and lowers resolution to 240p, the N64's native resolution");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Glitch line-up tick", "gDrawLineupTick", true, false);
|
||||
UIWidgets::Tooltip("Displays a tick in the top center of the screen to help with glitch line-ups in SoH, as traditional UI based line-ups do not work outside of 4:3");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Enable 3D Dropped items/projectiles", "gNewDrops", true, false);
|
||||
UIWidgets::Tooltip("Change most 2D items and projectiles on the overworld to their 3D versions");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Disable Black Bar Letterboxes", "gDisableBlackBars", true, false);
|
||||
UIWidgets::Tooltip("Disables Black Bar Letterboxes during cutscenes and Z-targeting\nNote: there may be minor visual glitches that were covered up by the black bars\nPlease disable this setting before reporting a bug");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Dynamic Wallet Icon", "gDynamicWalletIcon", true, false);
|
||||
UIWidgets::Tooltip("Changes the rupee in the wallet icon to match the wallet size you currently have");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Always show dungeon entrances", "gAlwaysShowDungeonMinimapIcon", true, false);
|
||||
UIWidgets::Tooltip("Always shows dungeon entrance icons on the minimap");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Show Gauntlets in First Person", "gFPSGauntlets", true, false);
|
||||
UIWidgets::Tooltip("Renders Gauntlets when using the Bow and Hookshot like in OOT3D");
|
||||
if (UIWidgets::PaddedEnhancementCheckbox("Color Temple of Time's Medallions", "gToTMedallionsColors", true, false)) {
|
||||
PatchToTMedallions();
|
||||
}
|
||||
UIWidgets::Tooltip("When medallions are collected, the medallion imprints around the Master Sword pedestal in the Temple of Time will become colored");
|
||||
|
||||
UIWidgets::Spacer(0);
|
||||
|
||||
if (ImGui::BeginMenu("Animated Link in Pause Menu")) {
|
||||
ImGui::Text("Rotation");
|
||||
UIWidgets::EnhancementRadioButton("Disabled", "gPauseLiveLinkRotation", 0);
|
||||
@ -1044,6 +1031,39 @@ void DrawEnhancementsMenu() {
|
||||
|
||||
ImGui::EndMenu();
|
||||
}
|
||||
|
||||
UIWidgets::Spacer(0);
|
||||
|
||||
UIWidgets::PaddedEnhancementCheckbox("Disable LOD", "gDisableLOD", true, false);
|
||||
UIWidgets::Tooltip("Turns off the Level of Detail setting, making models use their higher-poly variants at any distance");
|
||||
if (UIWidgets::PaddedEnhancementCheckbox("Disable Draw Distance", "gDisableDrawDistance", true, false)) {
|
||||
if (CVarGetInteger("gDisableDrawDistance", 0) == 0) {
|
||||
CVarSetInteger("gDisableKokiriDrawDistance", 0);
|
||||
}
|
||||
}
|
||||
UIWidgets::Tooltip("Turns off the objects draw distance, making objects being visible from a longer range");
|
||||
if (CVarGetInteger("gDisableDrawDistance", 0) == 1) {
|
||||
UIWidgets::PaddedEnhancementCheckbox("Kokiri Draw Distance", "gDisableKokiriDrawDistance", true, false);
|
||||
UIWidgets::Tooltip("The Kokiri are mystical beings that fade into view when approached\nEnabling this will remove their draw distance");
|
||||
}
|
||||
UIWidgets::PaddedEnhancementCheckbox("N64 Mode", "gLowResMode", true, false);
|
||||
UIWidgets::Tooltip("Sets aspect ratio to 4:3 and lowers resolution to 240p, the N64's native resolution");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Glitch line-up tick", "gDrawLineupTick", true, false);
|
||||
UIWidgets::Tooltip("Displays a tick in the top center of the screen to help with glitch line-ups in SoH, as traditional UI based line-ups do not work outside of 4:3");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Enable 3D Dropped items/projectiles", "gNewDrops", true, false);
|
||||
UIWidgets::Tooltip("Change most 2D items and projectiles on the overworld to their 3D versions");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Disable Black Bar Letterboxes", "gDisableBlackBars", true, false);
|
||||
UIWidgets::Tooltip("Disables Black Bar Letterboxes during cutscenes and Z-targeting\nNote: there may be minor visual glitches that were covered up by the black bars\nPlease disable this setting before reporting a bug");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Dynamic Wallet Icon", "gDynamicWalletIcon", true, false);
|
||||
UIWidgets::Tooltip("Changes the rupee in the wallet icon to match the wallet size you currently have");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Always show dungeon entrances", "gAlwaysShowDungeonMinimapIcon", true, false);
|
||||
UIWidgets::Tooltip("Always shows dungeon entrance icons on the minimap");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Show Gauntlets in First Person", "gFPSGauntlets", true, false);
|
||||
UIWidgets::Tooltip("Renders Gauntlets when using the Bow and Hookshot like in OOT3D");
|
||||
if (UIWidgets::PaddedEnhancementCheckbox("Color Temple of Time's Medallions", "gToTMedallionsColors", true, false)) {
|
||||
PatchToTMedallions();
|
||||
}
|
||||
UIWidgets::Tooltip("When medallions are collected, the medallion imprints around the Master Sword pedestal in the Temple of Time will become colored");
|
||||
UIWidgets::PaddedText("Fix Vanishing Paths", true, false);
|
||||
if (UIWidgets::EnhancementCombobox("gSceneSpecificDirtPathFix", zFightingOptions, ZFIGHT_FIX_DISABLED) && gPlayState != NULL) {
|
||||
UpdateDirtPathFixState(gPlayState->sceneNum);
|
||||
@ -1205,8 +1225,6 @@ void DrawEnhancementsMenu() {
|
||||
UIWidgets::PaddedEnhancementCheckbox("Shadow Tag Mode", "gShadowTag", true, false);
|
||||
UIWidgets::Tooltip("A wallmaster follows Link everywhere, don't get caught!");
|
||||
|
||||
UIWidgets::Spacer(0);
|
||||
|
||||
UIWidgets::PaddedEnhancementCheckbox("Additional Traps", "gAddTraps.enabled", true, false);
|
||||
UIWidgets::Tooltip("Enables additional Trap variants.");
|
||||
|
||||
@ -1295,6 +1313,51 @@ void DrawCheatsMenu() {
|
||||
if (ImGui::BeginMenu("Cheats"))
|
||||
{
|
||||
ImGui::BeginDisabled(CVarGetInteger("gDisableChangingSettings", 0));
|
||||
ImGui::SetCursorPosY(ImGui::GetCursorPosY() - 8.0f);
|
||||
ImGui::BeginTable("##cheatsMenu", 2, ImGuiTableFlags_SizingFixedFit);
|
||||
ImGui::TableSetupColumn("", ImGuiTableColumnFlags_WidthStretch);
|
||||
ImGui::TableSetupColumn("", ImGuiTableColumnFlags_WidthStretch);
|
||||
ImGui::TableNextColumn();
|
||||
UIWidgets::Spacer(2.0f);
|
||||
ImGui::Text("Inventory:");
|
||||
UIWidgets::PaddedSeparator();
|
||||
|
||||
UIWidgets::PaddedEnhancementCheckbox("Super Tunic", "gSuperTunic", true, false);
|
||||
UIWidgets::Tooltip("Makes every tunic have the effects of every other tunic");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Easy ISG", "gEzISG", true, false);
|
||||
UIWidgets::Tooltip("Passive Infinite Sword Glitch\nIt makes your sword's swing effect and hitbox stay active indefinitely");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Easy QPA", "gEzQPA", true, false);
|
||||
UIWidgets::Tooltip("Gives you the glitched damage value of the quick put away glitch.");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Timeless Equipment", "gTimelessEquipment", true, false);
|
||||
UIWidgets::Tooltip("Allows any item to be equipped, regardless of age\nAlso allows Child to use Adult strength upgrades");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Unrestricted Items", "gNoRestrictItems", true, false);
|
||||
UIWidgets::Tooltip("Allows you to use any item at any location");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Fireproof Deku Shield", "gFireproofDekuShield", true, false);
|
||||
UIWidgets::Tooltip("Prevents the Deku Shield from burning on contact with fire");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Shield with Two-Handed Weapons", "gShieldTwoHanded", true, false);
|
||||
UIWidgets::Tooltip("This allows you to put up your shield with any two-handed weapon in hand except for Deku Sticks");
|
||||
UIWidgets::Spacer(2.0f);
|
||||
ImGui::Text("Deku Sticks:");
|
||||
UIWidgets::EnhancementCombobox("gDekuStickCheat", DekuStickCheat, DEKU_STICK_NORMAL);
|
||||
UIWidgets::Spacer(2.0f);
|
||||
UIWidgets::EnhancementSliderFloat("Bomb Timer Multiplier: %.2fx", "##gBombTimerMultiplier", "gBombTimerMultiplier", 0.1f, 5.0f, "", 1.0f, false);
|
||||
UIWidgets::PaddedEnhancementCheckbox("Hookshot Everything", "gHookshotEverything", true, false);
|
||||
UIWidgets::Tooltip("Makes every surface in the game hookshot-able");
|
||||
UIWidgets::Spacer(0);
|
||||
UIWidgets::EnhancementSliderFloat("Hookshot Reach Multiplier: %.2fx", "##gCheatHookshotReachMultiplier", "gCheatHookshotReachMultiplier", 1.0f, 5.0f, "", 1.0f, false);
|
||||
UIWidgets::Spacer(2.0f);
|
||||
if (ImGui::Button("Change Age")) {
|
||||
CVarSetInteger("gSwitchAge", 1);
|
||||
}
|
||||
UIWidgets::Tooltip("Switches Link's age and reloads the area.");
|
||||
UIWidgets::Spacer(2.0f);
|
||||
if (ImGui::Button("Clear Cutscene Pointer")) {
|
||||
GameInteractor::RawAction::ClearCutscenePointer();
|
||||
}
|
||||
UIWidgets::Tooltip("Clears the cutscene pointer to a value safe for wrong warps.");
|
||||
|
||||
ImGui::TableNextColumn();
|
||||
UIWidgets::Spacer(2.0f);
|
||||
|
||||
if (ImGui::BeginMenu("Infinite...")) {
|
||||
UIWidgets::EnhancementCheckbox("Money", "gInfiniteMoney");
|
||||
@ -1307,51 +1370,8 @@ void DrawCheatsMenu() {
|
||||
ImGui::EndMenu();
|
||||
}
|
||||
|
||||
UIWidgets::PaddedEnhancementCheckbox("No Clip", "gNoClip", true, false);
|
||||
UIWidgets::Tooltip("Allows you to walk through walls");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Climb Everything", "gClimbEverything", true, false);
|
||||
UIWidgets::Tooltip("Makes every surface in the game climbable");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Hookshot Everything", "gHookshotEverything", true, false);
|
||||
UIWidgets::Tooltip("Makes every surface in the game hookshot-able");
|
||||
UIWidgets::Spacer(2.0f);
|
||||
UIWidgets::EnhancementSliderFloat("Hookshot Reach Multiplier: %.1fx", "##gCheatHookshotReachMultiplier", "gCheatHookshotReachMultiplier", 1.0f, 5.0f, "", 1.0f, false);
|
||||
UIWidgets::EnhancementSliderFloat("Bomb Timer Multiplier: %.1fx", "##gBombTimerMultiplier", "gBombTimerMultiplier", 0.1f, 5.0f, "", 1.0f, false);
|
||||
UIWidgets::PaddedEnhancementCheckbox("Moon Jump on L", "gMoonJumpOnL", true, false);
|
||||
UIWidgets::Tooltip("Holding L makes you float into the air");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Super Tunic", "gSuperTunic", true, false);
|
||||
UIWidgets::Tooltip("Makes every tunic have the effects of every other tunic");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Easy ISG", "gEzISG", true, false);
|
||||
UIWidgets::Tooltip("Passive Infinite Sword Glitch\nIt makes your sword's swing effect and hitbox stay active indefinitely");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Easy QPA", "gEzQPA", true, false);
|
||||
UIWidgets::Tooltip("Gives you the glitched damage value of the quick put away glitch.");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Timeless Equipment", "gTimelessEquipment", true, false);
|
||||
UIWidgets::Tooltip("Allows any item to be equipped, regardless of age\nAlso allows Child to use Adult strength upgrades");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Easy Frame Advancing", "gCheatEasyPauseBufferEnabled", true, false);
|
||||
UIWidgets::Tooltip("Continue holding START button when unpausing to only advance a single frame and then re-pause");
|
||||
const bool bEasyFrameAdvanceEnabled = CVarGetInteger("gCheatEasyPauseBufferEnabled", 0);
|
||||
UIWidgets::PaddedEnhancementCheckbox("Easy Input Buffering", "gCheatEasyInputBufferingEnabled", true, false, bEasyFrameAdvanceEnabled, "Forced enabled when Easy Frame Advancing is enabled");
|
||||
UIWidgets::Tooltip("Inputs that are held down while the Subscreen is closing will be pressed when the game is resumed");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Unrestricted Items", "gNoRestrictItems", true, false);
|
||||
UIWidgets::Tooltip("Allows you to use any item at any location");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Freeze Time", "gFreezeTime", true, false);
|
||||
UIWidgets::Tooltip("Freezes the time of day");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Drops Don't Despawn", "gDropsDontDie", true, false);
|
||||
UIWidgets::Tooltip("Drops from enemies, grass, etc. don't disappear after a set amount of time");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Fish Don't despawn", "gNoFishDespawn", true, false);
|
||||
UIWidgets::Tooltip("Prevents fish from automatically despawning after a while when dropped");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Bugs Don't despawn", "gNoBugsDespawn", true, false);
|
||||
UIWidgets::Tooltip("Prevents bugs from automatically despawning after a while when dropped");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Fireproof Deku Shield", "gFireproofDekuShield", true, false);
|
||||
UIWidgets::Tooltip("Prevents the Deku Shield from burning on contact with fire");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Shield with Two-Handed Weapons", "gShieldTwoHanded", true, false);
|
||||
UIWidgets::Tooltip("This allows you to put up your shield with any two-handed weapon in hand except for Deku Sticks");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Time Sync", "gTimeSync", true, false);
|
||||
UIWidgets::Tooltip("This syncs the ingame time with the real world time");
|
||||
ImGui::Text("Deku Sticks:");
|
||||
UIWidgets::EnhancementCombobox("gDekuStickCheat", DekuStickCheat, DEKU_STICK_NORMAL);
|
||||
UIWidgets::PaddedEnhancementCheckbox("No ReDead/Gibdo Freeze", "gNoRedeadFreeze", true, false);
|
||||
UIWidgets::Tooltip("Prevents ReDeads and Gibdos from being able to freeze you with their scream");
|
||||
UIWidgets::Spacer(2.0f);
|
||||
UIWidgets::Spacer(0);
|
||||
|
||||
if (ImGui::BeginMenu("Save States")) {
|
||||
ImGui::TextColored({ 0.85f, 0.85f, 0.0f, 1.0f }, " " ICON_FA_EXCLAMATION_TRIANGLE);
|
||||
ImGui::SameLine();
|
||||
@ -1363,19 +1383,47 @@ void DrawCheatsMenu() {
|
||||
UIWidgets::PaddedText("they WILL break across transitions and", true, false);
|
||||
UIWidgets::PaddedText("load zones (like doors). Support for", true, false);
|
||||
UIWidgets::PaddedText("related issues will not be provided.", true, false);
|
||||
if (UIWidgets::PaddedEnhancementCheckbox("I promise I have read the warning", "gSaveStatePromise", true, false)) {
|
||||
if (UIWidgets::PaddedEnhancementCheckbox("I promise I have read the warning", "gSaveStatePromise", true,
|
||||
false)) {
|
||||
CVarSetInteger("gSaveStatesEnabled", 0);
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
}
|
||||
if (CVarGetInteger("gSaveStatePromise", 0) == 1) {
|
||||
UIWidgets::PaddedEnhancementCheckbox("I understand, enable save states", "gSaveStatesEnabled", true, false);
|
||||
UIWidgets::PaddedEnhancementCheckbox("I understand, enable save states", "gSaveStatesEnabled", true,
|
||||
false);
|
||||
UIWidgets::Tooltip("F5 to save, F6 to change slots, F7 to load");
|
||||
}
|
||||
|
||||
ImGui::EndMenu();
|
||||
}
|
||||
UIWidgets::Spacer(2.0f);
|
||||
|
||||
UIWidgets::Spacer(2.0f);
|
||||
ImGui::Text("Behavior:");
|
||||
UIWidgets::PaddedSeparator();
|
||||
|
||||
UIWidgets::PaddedEnhancementCheckbox("No Clip", "gNoClip", true, false);
|
||||
UIWidgets::Tooltip("Allows you to walk through walls");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Climb Everything", "gClimbEverything", true, false);
|
||||
UIWidgets::Tooltip("Makes every surface in the game climbable");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Moon Jump on L", "gMoonJumpOnL", true, false);
|
||||
UIWidgets::Tooltip("Holding L makes you float into the air");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Easy Frame Advancing", "gCheatEasyPauseBufferEnabled", true, false);
|
||||
UIWidgets::Tooltip("Continue holding START button when unpausing to only advance a single frame and then re-pause");
|
||||
const bool bEasyFrameAdvanceEnabled = CVarGetInteger("gCheatEasyPauseBufferEnabled", 0);
|
||||
UIWidgets::PaddedEnhancementCheckbox("Easy Input Buffering", "gCheatEasyInputBufferingEnabled", true, false, bEasyFrameAdvanceEnabled, "Forced enabled when Easy Frame Advancing is enabled");
|
||||
UIWidgets::Tooltip("Inputs that are held down while the Subscreen is closing will be pressed when the game is resumed");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Drops Don't Despawn", "gDropsDontDie", true, false);
|
||||
UIWidgets::Tooltip("Drops from enemies, grass, etc. don't disappear after a set amount of time");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Fish Don't despawn", "gNoFishDespawn", true, false);
|
||||
UIWidgets::Tooltip("Prevents fish from automatically despawning after a while when dropped");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Bugs Don't despawn", "gNoBugsDespawn", true, false);
|
||||
UIWidgets::Tooltip("Prevents bugs from automatically despawning after a while when dropped");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Freeze Time", "gFreezeTime", true, false);
|
||||
UIWidgets::Tooltip("Freezes the time of day");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Time Sync", "gTimeSync", true, false);
|
||||
UIWidgets::Tooltip("This syncs the ingame time with the real world time");
|
||||
UIWidgets::PaddedEnhancementCheckbox("No ReDead/Gibdo Freeze", "gNoRedeadFreeze", true, false);
|
||||
UIWidgets::Tooltip("Prevents ReDeads and Gibdos from being able to freeze you with their scream");
|
||||
{
|
||||
static int32_t betaQuestEnabled = CVarGetInteger("gEnableBetaQuest", 0);
|
||||
static int32_t lastBetaQuestEnabled = betaQuestEnabled;
|
||||
@ -1439,19 +1487,8 @@ void DrawCheatsMenu() {
|
||||
}
|
||||
}
|
||||
|
||||
UIWidgets::Spacer(2.0f);
|
||||
if (ImGui::Button("Change Age")) {
|
||||
CVarSetInteger("gSwitchAge", 1);
|
||||
}
|
||||
UIWidgets::Tooltip("Switches Link's age and reloads the area.");
|
||||
|
||||
if (ImGui::Button("Clear Cutscene Pointer")) {
|
||||
GameInteractor::RawAction::ClearCutscenePointer();
|
||||
}
|
||||
UIWidgets::Tooltip("Clears the cutscene pointer to a value safe for wrong warps.");
|
||||
|
||||
ImGui::EndTable();
|
||||
ImGui::EndDisabled();
|
||||
|
||||
ImGui::EndMenu();
|
||||
}
|
||||
}
|
||||
|
@ -297,6 +297,7 @@ namespace UIWidgets {
|
||||
bool EnhancementSliderInt(const char* text, const char* id, const char* cvarName, int min, int max, const char* format, int defaultValue, bool PlusMinusButton, bool disabled, const char* disabledTooltipText) {
|
||||
bool changed = false;
|
||||
int val = CVarGetInteger(cvarName, defaultValue);
|
||||
const int oldVal = val;
|
||||
|
||||
if (disabled) {
|
||||
DisableComponent(ImGui::GetStyle().Alpha * 0.5f);
|
||||
@ -348,9 +349,11 @@ namespace UIWidgets {
|
||||
changed = true;
|
||||
}
|
||||
|
||||
if (changed) {
|
||||
if (changed && (oldVal != val)) {
|
||||
CVarSetInteger(cvarName, val);
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
} else {
|
||||
changed = false;
|
||||
}
|
||||
|
||||
return changed;
|
||||
@ -359,15 +362,46 @@ namespace UIWidgets {
|
||||
bool EnhancementSliderFloat(const char* text, const char* id, const char* cvarName, float min, float max, const char* format, float defaultValue, bool isPercentage, bool PlusMinusButton, bool disabled, const char* disabledTooltipText) {
|
||||
bool changed = false;
|
||||
float val = CVarGetFloat(cvarName, defaultValue);
|
||||
|
||||
const float oldVal = val;
|
||||
if (disabled) {
|
||||
DisableComponent(ImGui::GetStyle().Alpha * 0.5f);
|
||||
}
|
||||
|
||||
// Calculate how much precision to save based on the given range of the slider, limited to 6 decimal places
|
||||
// Precision is also used when adding/subtracting using the +/- buttons
|
||||
const float sliderWidth = std::min((ImGui::GetContentRegionAvail().x - 2.0f * (PlusMinusButton ? sliderButtonWidth : 0.0f)), maxSliderWidth);
|
||||
const float diff = (max - min) / sliderWidth;
|
||||
int ticks = 0;
|
||||
float increment = 1.0f;
|
||||
if (diff < 1.0f) {
|
||||
ticks++;
|
||||
increment = 0.1f;
|
||||
}
|
||||
if (diff < 0.1f) {
|
||||
ticks++;
|
||||
increment = 0.01f;
|
||||
}
|
||||
if (diff < 0.01f) {
|
||||
ticks++;
|
||||
increment = 0.001f;
|
||||
}
|
||||
if (diff < 0.001f) {
|
||||
ticks++;
|
||||
increment = 0.0001f;
|
||||
}
|
||||
if (diff < 0.0001f) {
|
||||
ticks++;
|
||||
increment = 0.00001f;
|
||||
}
|
||||
if (diff < 0.00001f) {
|
||||
ticks++;
|
||||
increment = 0.000001f;
|
||||
}
|
||||
|
||||
if (!isPercentage) {
|
||||
ImGui::Text(text, val);
|
||||
} else {
|
||||
ImGui::Text(text, static_cast<int>(100 * val));
|
||||
ImGui::Text(text, val * 100.0f);
|
||||
}
|
||||
Spacer(0);
|
||||
|
||||
@ -375,22 +409,15 @@ namespace UIWidgets {
|
||||
if (PlusMinusButton) {
|
||||
std::string MinusBTNName = " - ##" + std::string(cvarName);
|
||||
if (ImGui::Button(MinusBTNName.c_str())) {
|
||||
if (isPercentage) {
|
||||
val -= 0.01f;
|
||||
} else {
|
||||
val -= 0.1f;
|
||||
}
|
||||
val -= increment;
|
||||
changed = true;
|
||||
}
|
||||
ImGui::SameLine();
|
||||
ImGui::SetCursorPosX(ImGui::GetCursorPosX() - 7.0f);
|
||||
}
|
||||
|
||||
ImGui::PushItemWidth(std::min((ImGui::GetContentRegionAvail().x - (PlusMinusButton ? sliderButtonWidth : 0.0f)), maxSliderWidth));
|
||||
ImGui::PushItemWidth(sliderWidth);
|
||||
if (ImGui::SliderFloat(id, &val, min, max, format, ImGuiSliderFlags_AlwaysClamp)) {
|
||||
if (isPercentage) {
|
||||
val = roundf(val * 100) / 100;
|
||||
}
|
||||
changed = true;
|
||||
}
|
||||
ImGui::PopItemWidth();
|
||||
@ -400,11 +427,7 @@ namespace UIWidgets {
|
||||
ImGui::SameLine();
|
||||
ImGui::SetCursorPosX(ImGui::GetCursorPosX() - 7.0f);
|
||||
if (ImGui::Button(PlusBTNName.c_str())) {
|
||||
if (isPercentage) {
|
||||
val += 0.01f;
|
||||
} else {
|
||||
val += 0.1f;
|
||||
}
|
||||
val += increment;
|
||||
changed = true;
|
||||
}
|
||||
}
|
||||
@ -424,9 +447,14 @@ namespace UIWidgets {
|
||||
changed = true;
|
||||
}
|
||||
|
||||
if (changed) {
|
||||
if (changed && !(abs(oldVal - val) < 0.000001f)) {
|
||||
std::stringstream ss;
|
||||
ss << std::setprecision(ticks) << val;
|
||||
val = std::stof(ss.str());
|
||||
CVarSetFloat(cvarName, val);
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
} else {
|
||||
changed = false;
|
||||
}
|
||||
|
||||
return changed;
|
||||
|
@ -9,6 +9,7 @@
|
||||
#define UIWidgets_hpp
|
||||
|
||||
#include <string>
|
||||
#include <sstream>
|
||||
#include <vector>
|
||||
#include <span>
|
||||
#include <stdint.h>
|
||||
|
Loading…
Reference in New Issue
Block a user