mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-12-01 13:52:19 -05:00
Cleanup of ImGui code (#2576)
* Change sliders to have +/- buttons by default * Remove unnecessary margin setting * Add +/- buttons to remaining sliders and fix some broken UI * Update EnhancementComboBox to not need array size * Remove redundant widgets from randomizer * Miscellaneous fixes * Fix Switch build break * Consolidate disabled styling in widgets * Simplify widget logic * Merge with most recent PRs * Fix audio fanfare and sound effect sliders mixup * Fix sliders being one button too wide * Fix sliders being too long * Fix sliders being too long on console
This commit is contained in:
parent
2aa7c71eac
commit
21d82e7c4c
@ -2226,7 +2226,6 @@ typedef enum {
|
|||||||
/* 0x00 */ PAUSE_ANY_CURSOR_RANDO_ONLY,
|
/* 0x00 */ PAUSE_ANY_CURSOR_RANDO_ONLY,
|
||||||
/* 0x01 */ PAUSE_ANY_CURSOR_ALWAYS_ON,
|
/* 0x01 */ PAUSE_ANY_CURSOR_ALWAYS_ON,
|
||||||
/* 0x02 */ PAUSE_ANY_CURSOR_ALWAYS_OFF,
|
/* 0x02 */ PAUSE_ANY_CURSOR_ALWAYS_OFF,
|
||||||
/* 0x03 */ PAUSE_ANY_CURSOR_MAX
|
|
||||||
} PauseCursorAnySlotOptions;
|
} PauseCursorAnySlotOptions;
|
||||||
|
|
||||||
#define ROM_FILE(name) \
|
#define ROM_FILE(name) \
|
||||||
|
@ -366,8 +366,10 @@ void DrawSfxEditor(bool& open) {
|
|||||||
"is loaded to the main sequence player (does not apply to fanfares or enemy BGM)."
|
"is loaded to the main sequence player (does not apply to fanfares or enemy BGM)."
|
||||||
);
|
);
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
|
ImGui::PushItemWidth(ImGui::GetContentRegionAvail().x);
|
||||||
UIWidgets::EnhancementSliderInt("Overlay Duration: %d seconds", "##SeqNameOverlayDuration",
|
UIWidgets::EnhancementSliderInt("Overlay Duration: %d seconds", "##SeqNameOverlayDuration",
|
||||||
"gSeqNameOverlayDuration", 1, 10, "", 5, true);
|
"gSeqNameOverlayDuration", 1, 10, "", 5);
|
||||||
|
ImGui::PopItemWidth();
|
||||||
ImGui::NewLine();
|
ImGui::NewLine();
|
||||||
UIWidgets::PaddedSeparator();
|
UIWidgets::PaddedSeparator();
|
||||||
UIWidgets::PaddedText("The following options are experimental and may cause music\nto sound odd or have other undesireable effects.");
|
UIWidgets::PaddedText("The following options are experimental and may cause music\nto sound odd or have other undesireable effects.");
|
||||||
|
@ -136,6 +136,7 @@ namespace GameControlEditor {
|
|||||||
}
|
}
|
||||||
if (ImGui::Selectable(i->second, i->first == currentButton)) {
|
if (ImGui::Selectable(i->second, i->first == currentButton)) {
|
||||||
CVarSetInteger(mapping.cVarName, i->first);
|
CVarSetInteger(mapping.cVarName, i->first);
|
||||||
|
SohImGui::RequestCvarSaveOnNextTick();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ImGui::EndCombo();
|
ImGui::EndCombo();
|
||||||
@ -209,6 +210,7 @@ namespace GameControlEditor {
|
|||||||
UIWidgets::EnhancementCheckbox("Play with D-pad", "gDpadOcarina");
|
UIWidgets::EnhancementCheckbox("Play with D-pad", "gDpadOcarina");
|
||||||
TableHelper::NextCol();
|
TableHelper::NextCol();
|
||||||
UIWidgets::EnhancementCheckbox("Play with camera stick", "gRStickOcarina");
|
UIWidgets::EnhancementCheckbox("Play with camera stick", "gRStickOcarina");
|
||||||
|
UIWidgets::Spacer(0);
|
||||||
ImGui::EndTable();
|
ImGui::EndTable();
|
||||||
}
|
}
|
||||||
SohImGui::EndGroupPanel();
|
SohImGui::EndGroupPanel();
|
||||||
@ -236,21 +238,20 @@ namespace GameControlEditor {
|
|||||||
DrawHelpIcon("Allows for aiming with the right stick in:\n-First-Person/C-Up view\n-Weapon Aiming");
|
DrawHelpIcon("Allows for aiming with the right stick in:\n-First-Person/C-Up view\n-Weapon Aiming");
|
||||||
UIWidgets::PaddedEnhancementCheckbox("Invert Aiming X Axis", "gInvertAimingXAxis");
|
UIWidgets::PaddedEnhancementCheckbox("Invert Aiming X Axis", "gInvertAimingXAxis");
|
||||||
DrawHelpIcon("Inverts the Camera X Axis in:\n-First-Person/C-Up view\n-Weapon Aiming");
|
DrawHelpIcon("Inverts the Camera X Axis in:\n-First-Person/C-Up view\n-Weapon Aiming");
|
||||||
ImGui::SetCursorPosX(ImGui::GetCursorPosX() + 5);
|
|
||||||
UIWidgets::PaddedEnhancementCheckbox("Invert Aiming Y Axis", "gInvertAimingYAxis");
|
UIWidgets::PaddedEnhancementCheckbox("Invert Aiming Y Axis", "gInvertAimingYAxis");
|
||||||
DrawHelpIcon("Inverts the Camera Y Axis in:\n-First-Person/C-Up view\n-Weapon Aiming");
|
DrawHelpIcon("Inverts the Camera Y Axis in:\n-First-Person/C-Up view\n-Weapon Aiming");
|
||||||
ImGui::SetCursorPosX(ImGui::GetCursorPosX() + 5);
|
|
||||||
UIWidgets::PaddedEnhancementCheckbox("Disable Auto-Centering in First-Person View", "gDisableAutoCenterViewFirstPerson");
|
UIWidgets::PaddedEnhancementCheckbox("Disable Auto-Centering in First-Person View", "gDisableAutoCenterViewFirstPerson");
|
||||||
DrawHelpIcon("Prevents the C-Up view from auto-centering, allowing for Gyro Aiming");
|
DrawHelpIcon("Prevents the C-Up view from auto-centering, allowing for Gyro Aiming");
|
||||||
UIWidgets::PaddedEnhancementCheckbox("Enable Custom Aiming/First-Person sensitivity", "gEnableFirstPersonSensitivity", true, false);
|
UIWidgets::PaddedEnhancementCheckbox("Enable Custom Aiming/First-Person sensitivity", "gEnableFirstPersonSensitivity", true, false);
|
||||||
if (CVarGetInteger("gEnableFirstPersonSensitivity", 0)) {
|
if (CVarGetInteger("gEnableFirstPersonSensitivity", 0)) {
|
||||||
UIWidgets::EnhancementSliderFloat("Aiming/First-Person Horizontal Sensitivity: %d %%", "##FirstPersonSensitivity Horizontal",
|
UIWidgets::EnhancementSliderFloat("Aiming/First-Person Horizontal Sensitivity: %d %%", "##FirstPersonSensitivity Horizontal",
|
||||||
"gFirstPersonCameraSensitivityX", 0.01f, 5.0f, "", 1.0f, true, true);
|
"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: %d %%", "##FirstPersonSensitivity Vertical",
|
||||||
"gFirstPersonCameraSensitivityY", 0.01f, 5.0f, "", 1.0f, true, true);
|
"gFirstPersonCameraSensitivityY", 0.01f, 5.0f, "", 1.0f, true);
|
||||||
} else {
|
} else {
|
||||||
CVarSetFloat("gFirstPersonCameraSensitivity", 1.0f);
|
CVarSetFloat("gFirstPersonCameraSensitivity", 1.0f);
|
||||||
}
|
}
|
||||||
|
UIWidgets::Spacer(0);
|
||||||
SohImGui::EndGroupPanel();
|
SohImGui::EndGroupPanel();
|
||||||
|
|
||||||
UIWidgets::Spacer(0);
|
UIWidgets::Spacer(0);
|
||||||
@ -263,14 +264,15 @@ namespace GameControlEditor {
|
|||||||
DrawHelpIcon("Inverts the Camera X Axis in:\n-Free camera");
|
DrawHelpIcon("Inverts the Camera X Axis in:\n-Free camera");
|
||||||
UIWidgets::PaddedEnhancementCheckbox("Invert Camera Y Axis", "gInvertYAxis");
|
UIWidgets::PaddedEnhancementCheckbox("Invert Camera Y Axis", "gInvertYAxis");
|
||||||
DrawHelpIcon("Inverts the Camera Y Axis in:\n-Free camera");
|
DrawHelpIcon("Inverts the Camera Y Axis in:\n-Free camera");
|
||||||
+ UIWidgets::EnhancementSliderFloat("Third-Person Horizontal Sensitivity: %d %%", "##ThirdPersonSensitivity Horizontal",
|
UIWidgets::Spacer(0);
|
||||||
+ "gThirdPersonCameraSensitivityX", 0.01f, 5.0f, "", 1.0f, true, true);
|
+ UIWidgets::PaddedEnhancementSliderFloat("Third-Person Horizontal Sensitivity: %d %%", "##ThirdPersonSensitivity Horizontal",
|
||||||
+ UIWidgets::EnhancementSliderFloat("Third-Person Vertical Sensitivity: %d %%", "##ThirdPersonSensitivity Vertical",
|
+ "gThirdPersonCameraSensitivityX", 0.01f, 5.0f, "", 1.0f, true, true, false, true);
|
||||||
+ "gThirdPersonCameraSensitivityY", 0.01f, 5.0f, "", 1.0f, true, true);
|
+ UIWidgets::PaddedEnhancementSliderFloat("Third-Person Vertical Sensitivity: %d %%", "##ThirdPersonSensitivity Vertical",
|
||||||
UIWidgets::EnhancementSliderInt("Camera Distance: %d", "##CamDist",
|
+ "gThirdPersonCameraSensitivityY", 0.01f, 5.0f, "", 1.0f, true, true, false, true);
|
||||||
"gFreeCameraDistMax", 100, 900, "", 185, true);
|
UIWidgets::PaddedEnhancementSliderInt("Camera Distance: %d", "##CamDist",
|
||||||
UIWidgets::EnhancementSliderInt("Camera Transition Speed: %d", "##CamTranSpeed",
|
"gFreeCameraDistMax", 100, 900, "", 185, true, false, true);
|
||||||
"gFreeCameraTransitionSpeed", 0, 900, "", 25, true);
|
UIWidgets::PaddedEnhancementSliderInt("Camera Transition Speed: %d", "##CamTranSpeed",
|
||||||
|
"gFreeCameraTransitionSpeed", 0, 900, "", 25, true, false, true);
|
||||||
SohImGui::EndGroupPanel();
|
SohImGui::EndGroupPanel();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -303,7 +305,7 @@ namespace GameControlEditor {
|
|||||||
SohImGui::BeginGroupPanel("Misc Controls", ImGui::GetContentRegionAvail());
|
SohImGui::BeginGroupPanel("Misc Controls", ImGui::GetContentRegionAvail());
|
||||||
UIWidgets::PaddedText("Allow the cursor to be on any slot");
|
UIWidgets::PaddedText("Allow the cursor to be on any slot");
|
||||||
static const char* cursorOnAnySlot[3] = { "Only in Rando", "Always", "Never" };
|
static const char* cursorOnAnySlot[3] = { "Only in Rando", "Always", "Never" };
|
||||||
UIWidgets::EnhancementCombobox("gPauseAnyCursor", cursorOnAnySlot, PAUSE_ANY_CURSOR_MAX, PAUSE_ANY_CURSOR_RANDO_ONLY);
|
UIWidgets::EnhancementCombobox("gPauseAnyCursor", cursorOnAnySlot, PAUSE_ANY_CURSOR_RANDO_ONLY);
|
||||||
DrawHelpIcon("Allows the cursor on the pause menu to be over any slot. Sometimes required in rando to select "
|
DrawHelpIcon("Allows the cursor on the pause menu to be over any slot. Sometimes required in rando to select "
|
||||||
"certain items.");
|
"certain items.");
|
||||||
UIWidgets::Spacer(0);
|
UIWidgets::Spacer(0);
|
||||||
@ -313,8 +315,8 @@ namespace GameControlEditor {
|
|||||||
UIWidgets::Spacer(5);
|
UIWidgets::Spacer(5);
|
||||||
SohImGui::BeginGroupPanel("Walk Modifier", ImGui::GetContentRegionAvail());
|
SohImGui::BeginGroupPanel("Walk Modifier", ImGui::GetContentRegionAvail());
|
||||||
UIWidgets::PaddedEnhancementCheckbox("Toggle modifier instead of holding", "gWalkSpeedToggle", true, false);
|
UIWidgets::PaddedEnhancementCheckbox("Toggle modifier instead of holding", "gWalkSpeedToggle", true, false);
|
||||||
UIWidgets::EnhancementSliderFloat("Modifier 1: %d %%", "##WalkMod1", "gWalkModifierOne", 0.0f, 5.0f, "", 1.0f, true);
|
UIWidgets::PaddedEnhancementSliderFloat("Modifier 1: %d %%", "##WalkMod1", "gWalkModifierOne", 0.0f, 5.0f, "", 1.0f, true, true, false, true);
|
||||||
UIWidgets::EnhancementSliderFloat("Modifier 2: %d %%", "##WalkMod2", "gWalkModifierTwo", 0.0f, 5.0f, "", 1.0f, true);
|
UIWidgets::PaddedEnhancementSliderFloat("Modifier 2: %d %%", "##WalkMod2", "gWalkModifierTwo", 0.0f, 5.0f, "", 1.0f, true, true, false, true);
|
||||||
SohImGui::EndGroupPanel();
|
SohImGui::EndGroupPanel();
|
||||||
}
|
}
|
||||||
UIWidgets::Spacer(0);
|
UIWidgets::Spacer(0);
|
||||||
|
@ -317,11 +317,12 @@ static std::map<std::string, CosmeticOption> cosmeticOptions = {
|
|||||||
COSMETIC_OPTION("NPC_IronKnuckles", "Iron Knuckles", GROUP_NPC, ImVec4(245, 255, 205, 255), false, true, false),
|
COSMETIC_OPTION("NPC_IronKnuckles", "Iron Knuckles", GROUP_NPC, ImVec4(245, 255, 205, 255), false, true, false),
|
||||||
};
|
};
|
||||||
|
|
||||||
const char* MarginCvarList[] {
|
static const char* MarginCvarList[] {
|
||||||
"gHearts", "gHeartsCount", "gMagicBar", "gVSOA", "gBBtn", "gABtn", "gStartBtn",
|
"gHearts", "gHeartsCount", "gMagicBar", "gVSOA", "gBBtn", "gABtn", "gStartBtn",
|
||||||
"gCBtnU", "gCBtnD", "gCBtnL", "gCBtnR", "gDPad", "gMinimap",
|
"gCBtnU", "gCBtnD", "gCBtnL", "gCBtnR", "gDPad", "gMinimap",
|
||||||
"gSKC", "gRC", "gCarrots", "gTimers", "gAS", "gTCM", "gTCB"
|
"gSKC", "gRC", "gCarrots", "gTimers", "gAS", "gTCM", "gTCB"
|
||||||
};
|
};
|
||||||
|
static const char* MarginCvarNonAnchor[]{ "gCarrots", "gTimers", "gAS", "gTCM","gTCB" };
|
||||||
|
|
||||||
ImVec4 GetRandomValue(int MaximumPossible){
|
ImVec4 GetRandomValue(int MaximumPossible){
|
||||||
ImVec4 NewColor;
|
ImVec4 NewColor;
|
||||||
@ -345,24 +346,26 @@ void SetMarginAll(const char* ButtonName, bool SetActivated) {
|
|||||||
if (ImGui::Button(ButtonName)) {
|
if (ImGui::Button(ButtonName)) {
|
||||||
u8 arrayLength = sizeof(MarginCvarList) / sizeof(*MarginCvarList);
|
u8 arrayLength = sizeof(MarginCvarList) / sizeof(*MarginCvarList);
|
||||||
//MarginCvarNonAnchor is an array that list every element that has No anchor by default, because if that the case this function will not touch it with pose type 0.
|
//MarginCvarNonAnchor is an array that list every element that has No anchor by default, because if that the case this function will not touch it with pose type 0.
|
||||||
const char* MarginCvarNonAnchor[] { "gCarrots", "gTimers", "gAS", "gTCM","gTCB" };
|
|
||||||
u8 arrayLengthNonMargin = sizeof(MarginCvarNonAnchor) / sizeof(*MarginCvarNonAnchor);
|
u8 arrayLengthNonMargin = sizeof(MarginCvarNonAnchor) / sizeof(*MarginCvarNonAnchor);
|
||||||
for (u8 s = 0; s < arrayLength; s++) {
|
for (u8 s = 0; s < arrayLength; s++) {
|
||||||
std::string cvarName = MarginCvarList[s];
|
const char* cvarName = MarginCvarList[s];
|
||||||
std::string cvarPosType = cvarName+"PosType";
|
const char* cvarPosType = std::string(cvarName).append("PosType").c_str();
|
||||||
std::string cvarNameMargins = cvarName+"UseMargins";
|
const char* cvarNameMargins = std::string(cvarName).append("UseMargins").c_str();
|
||||||
if (CVarGetInteger(cvarPosType.c_str(),0) <= 2 && SetActivated) { //Our element is not Hidden or Non anchor
|
if (CVarGetInteger(cvarPosType,0) <= 2 && SetActivated) { //Our element is not Hidden or Non anchor
|
||||||
for(int i = 0; i < arrayLengthNonMargin; i++){
|
for (int i = 0; i < arrayLengthNonMargin; i++){
|
||||||
if(MarginCvarNonAnchor[i] == cvarName && CVarGetInteger(cvarPosType.c_str(),0) == 0){ //Our element is both in original position and do not have anchor by default so we skip it.
|
if ((strcmp(cvarName, MarginCvarNonAnchor[i]) == 0) && (CVarGetInteger(cvarPosType, 0) == 0)) { //Our element is both in original position and do not have anchor by default so we skip it.
|
||||||
CVarSetInteger(cvarNameMargins.c_str(), false); //force set off
|
CVarSetInteger(cvarNameMargins, false); //force set off
|
||||||
} else if(MarginCvarNonAnchor[i] == cvarName && CVarGetInteger(cvarPosType.c_str(),0) != 0){ //Our element is not in original position regarless it has no anchor by default since player made it anchored we can toggle margins
|
}
|
||||||
CVarSetInteger(cvarNameMargins.c_str(), SetActivated);
|
else if ((strcmp(cvarName, MarginCvarNonAnchor[i]) == 0) && (CVarGetInteger(cvarPosType, 0) != 0)) { //Our element is not in original position regarless it has no anchor by default since player made it anchored we can toggle margins
|
||||||
} else if(MarginCvarNonAnchor[i] != cvarName){ //Our elements has an anchor by default so regarless of it's position right now that okay to toggle margins.
|
CVarSetInteger(cvarNameMargins, SetActivated);
|
||||||
CVarSetInteger(cvarNameMargins.c_str(), SetActivated);
|
}
|
||||||
|
else if (strcmp(cvarName, MarginCvarNonAnchor[i]) != 0) { //Our elements has an anchor by default so regarless of it's position right now that okay to toggle margins.
|
||||||
|
CVarSetInteger(cvarNameMargins, SetActivated);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else { //Since the user requested to turn all margin off no need to do any check there.
|
}
|
||||||
CVarSetInteger(cvarNameMargins.c_str(), SetActivated);
|
else { //Since the user requested to turn all margin off no need to do any check there.
|
||||||
|
CVarSetInteger(cvarNameMargins, SetActivated);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -371,11 +374,11 @@ void ResetPositionAll() {
|
|||||||
if (ImGui::Button("Reset all positions")) {
|
if (ImGui::Button("Reset all positions")) {
|
||||||
u8 arrayLength = sizeof(MarginCvarList) / sizeof(*MarginCvarList);
|
u8 arrayLength = sizeof(MarginCvarList) / sizeof(*MarginCvarList);
|
||||||
for (u8 s = 0; s < arrayLength; s++) {
|
for (u8 s = 0; s < arrayLength; s++) {
|
||||||
std::string cvarName = MarginCvarList[s];
|
const char* cvarName = MarginCvarList[s];
|
||||||
std::string cvarPosType = cvarName+"PosType";
|
const char* cvarPosType = std::string(cvarName).append("PosType").c_str();
|
||||||
std::string cvarNameMargins = cvarName+"UseMargins";
|
const char* cvarNameMargins = std::string(cvarName).append("UseMargins").c_str();
|
||||||
CVarSetInteger(cvarPosType.c_str(), 0);
|
CVarSetInteger(cvarPosType, 0);
|
||||||
CVarSetInteger(cvarNameMargins.c_str(), false); //Turn margin off to everythings as that original position.
|
CVarSetInteger(cvarNameMargins, false); //Turn margin off to everythings as that original position.
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1092,30 +1095,30 @@ void DrawPositionSlider(const std::string CvarName, int MinY, int MaxY, int MinX
|
|||||||
std::string PosYCvar = CvarName+"PosY";
|
std::string PosYCvar = CvarName+"PosY";
|
||||||
std::string InvisibleLabelX = "##"+PosXCvar;
|
std::string InvisibleLabelX = "##"+PosXCvar;
|
||||||
std::string InvisibleLabelY = "##"+PosYCvar;
|
std::string InvisibleLabelY = "##"+PosYCvar;
|
||||||
UIWidgets::EnhancementSliderInt("Up <-> Down : %d", InvisibleLabelY.c_str(), PosYCvar.c_str(), MinY, MaxY, "", 0, true);
|
UIWidgets::EnhancementSliderInt("Up <-> Down : %d", InvisibleLabelY.c_str(), PosYCvar.c_str(), MinY, MaxY, "", 0);
|
||||||
UIWidgets::Tooltip("This slider is used to move Up and Down your elements.");
|
UIWidgets::Tooltip("This slider is used to move Up and Down your elements.");
|
||||||
UIWidgets::EnhancementSliderInt("Left <-> Right : %d", InvisibleLabelX.c_str(), PosXCvar.c_str(), MinX, MaxX, "", 0, true);
|
UIWidgets::EnhancementSliderInt("Left <-> Right : %d", InvisibleLabelX.c_str(), PosXCvar.c_str(), MinX, MaxX, "", 0);
|
||||||
UIWidgets::Tooltip("This slider is used to move Left and Right your elements.");
|
UIWidgets::Tooltip("This slider is used to move Left and Right your elements.");
|
||||||
}
|
}
|
||||||
void DrawScaleSlider(const std::string CvarName,float DefaultValue){
|
void DrawScaleSlider(const std::string CvarName,float DefaultValue){
|
||||||
std::string InvisibleLabel = "##"+CvarName;
|
std::string InvisibleLabel = "##"+CvarName;
|
||||||
std::string CvarLabel = CvarName+"Scale";
|
std::string CvarLabel = CvarName+"Scale";
|
||||||
//Disabled for now. feature not done and several fixes needed to be merged.
|
//Disabled for now. feature not done and several fixes needed to be merged.
|
||||||
//UIWidgets::EnhancementSliderFloat("Scale : %dx", InvisibleLabel.c_str(), CvarLabel.c_str(), 0.1f, 3.0f,"",DefaultValue,true,true);
|
//UIWidgets::EnhancementSliderFloat("Scale : %dx", InvisibleLabel.c_str(), CvarLabel.c_str(), 0.1f, 3.0f,"",DefaultValue,true);
|
||||||
}
|
}
|
||||||
void Draw_Placements(){
|
void Draw_Placements(){
|
||||||
if (ImGui::BeginTable("tableMargins", 1, FlagsTable)) {
|
if (ImGui::BeginTable("tableMargins", 1, FlagsTable)) {
|
||||||
ImGui::TableSetupColumn("General margins settings", FlagsCell, TablesCellsWidth);
|
ImGui::TableSetupColumn("General margins settings", FlagsCell, TablesCellsWidth);
|
||||||
Table_InitHeader();
|
Table_InitHeader();
|
||||||
UIWidgets::EnhancementSliderInt("Top : %dx", "##UIMARGINT", "gHUDMargin_T", (ImGui::GetWindowViewport()->Size.y/2)*-1, 25, "", 0, true);
|
UIWidgets::EnhancementSliderInt("Top : %dx", "##UIMARGINT", "gHUDMargin_T", (ImGui::GetWindowViewport()->Size.y/2)*-1, 25, "", 0);
|
||||||
UIWidgets::EnhancementSliderInt("Left: %dx", "##UIMARGINL", "gHUDMargin_L", -25, ImGui::GetWindowViewport()->Size.x, "", 0, true);
|
UIWidgets::EnhancementSliderInt("Left: %dx", "##UIMARGINL", "gHUDMargin_L", -25, ImGui::GetWindowViewport()->Size.x, "", 0);
|
||||||
UIWidgets::EnhancementSliderInt("Right: %dx", "##UIMARGINR", "gHUDMargin_R", (ImGui::GetWindowViewport()->Size.x)*-1, 25, "", 0, true);
|
UIWidgets::EnhancementSliderInt("Right: %dx", "##UIMARGINR", "gHUDMargin_R", (ImGui::GetWindowViewport()->Size.x)*-1, 25, "", 0);
|
||||||
UIWidgets::EnhancementSliderInt("Bottom: %dx", "##UIMARGINB", "gHUDMargin_B", (ImGui::GetWindowViewport()->Size.y/2)*-1, 25, "", 0, true);
|
UIWidgets::EnhancementSliderInt("Bottom: %dx", "##UIMARGINB", "gHUDMargin_B", (ImGui::GetWindowViewport()->Size.y/2)*-1, 25, "", 0);
|
||||||
SetMarginAll("All margins on",true);
|
SetMarginAll("All margins on",true);
|
||||||
UIWidgets::Tooltip("Set most of the element to use margin\nSome elements with default position will not be affected\nElements without Archor or Hidden will not be turned on");
|
UIWidgets::Tooltip("Set most of the elements to use margins\nSome elements with default position will not be affected\nElements without Anchor or Hidden will not be turned on");
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
SetMarginAll("All margins off",false);
|
SetMarginAll("All margins off",false);
|
||||||
UIWidgets::Tooltip("Set all of the element to not use margin");
|
UIWidgets::Tooltip("Set all of the elements to not use margins");
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
ResetPositionAll();
|
ResetPositionAll();
|
||||||
UIWidgets::Tooltip("Revert every element to use their original position and no margins");
|
UIWidgets::Tooltip("Revert every element to use their original position and no margins");
|
||||||
@ -1130,7 +1133,7 @@ void Draw_Placements(){
|
|||||||
DrawPositionsRadioBoxes("gHeartsCount");
|
DrawPositionsRadioBoxes("gHeartsCount");
|
||||||
DrawPositionSlider("gHeartsCount",-22,ImGui::GetWindowViewport()->Size.y,-125,ImGui::GetWindowViewport()->Size.x);
|
DrawPositionSlider("gHeartsCount",-22,ImGui::GetWindowViewport()->Size.y,-125,ImGui::GetWindowViewport()->Size.x);
|
||||||
DrawScaleSlider("gHeartsCount",0.7f);
|
DrawScaleSlider("gHeartsCount",0.7f);
|
||||||
UIWidgets::EnhancementSliderInt("Heart line length : %d", "##HeartLineLength", "gHeartsLineLength", 0, 20, "", 10, true);
|
UIWidgets::EnhancementSliderInt("Heart line length : %d", "##HeartLineLength", "gHeartsLineLength", 0, 20, "", 10);
|
||||||
UIWidgets::Tooltip("This will set the length of a row of hearts. Set to 0 for unlimited length.");
|
UIWidgets::Tooltip("This will set the length of a row of hearts. Set to 0 for unlimited length.");
|
||||||
ImGui::NewLine();
|
ImGui::NewLine();
|
||||||
ImGui::EndTable();
|
ImGui::EndTable();
|
||||||
@ -1659,7 +1662,7 @@ void DrawCosmeticGroup(CosmeticGroup cosmeticGroup) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* colorSchemes[2] = {
|
static const char* colorSchemes[2] = {
|
||||||
"N64",
|
"N64",
|
||||||
"Gamecube",
|
"Gamecube",
|
||||||
};
|
};
|
||||||
@ -1678,7 +1681,7 @@ void DrawCosmeticsEditor(bool& open) {
|
|||||||
|
|
||||||
ImGui::Text("Color Scheme");
|
ImGui::Text("Color Scheme");
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
UIWidgets::EnhancementCombobox("gCosmetics.DefaultColorScheme", colorSchemes, 2, 0);
|
UIWidgets::EnhancementCombobox("gCosmetics.DefaultColorScheme", colorSchemes, 0);
|
||||||
UIWidgets::EnhancementCheckbox("Advanced Mode", "gCosmetics.AdvancedMode");
|
UIWidgets::EnhancementCheckbox("Advanced Mode", "gCosmetics.AdvancedMode");
|
||||||
if (CVarGetInteger("gCosmetics.AdvancedMode", 0)) {
|
if (CVarGetInteger("gCosmetics.AdvancedMode", 0)) {
|
||||||
if (ImGui::Button("Lock All Advanced", ImVec2(ImGui::GetContentRegionAvail().x / 2, 30.0f))) {
|
if (ImGui::Button("Lock All Advanced", ImVec2(ImGui::GetContentRegionAvail().x / 2, 30.0f))) {
|
||||||
@ -1754,7 +1757,7 @@ void DrawCosmeticsEditor(bool& open) {
|
|||||||
DrawCosmeticGroup(GROUP_ARROWS);
|
DrawCosmeticGroup(GROUP_ARROWS);
|
||||||
DrawCosmeticGroup(GROUP_SPIN_ATTACK);
|
DrawCosmeticGroup(GROUP_SPIN_ATTACK);
|
||||||
DrawCosmeticGroup(GROUP_TRAILS);
|
DrawCosmeticGroup(GROUP_TRAILS);
|
||||||
if (UIWidgets::EnhancementSliderInt("Trails Duration: %d", "##Trails_Duration", "gCosmetics.Trails_Duration.Value", 2, 20, "", 4, false)) {
|
if (UIWidgets::EnhancementSliderInt("Trails Duration: %d", "##Trails_Duration", "gCosmetics.Trails_Duration.Value", 2, 20, "", 4)) {
|
||||||
CVarSetInteger("gCosmetics.Trails_Duration.Changed", 1);
|
CVarSetInteger("gCosmetics.Trails_Duration.Changed", 1);
|
||||||
}
|
}
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
|
@ -285,12 +285,10 @@ static bool TakeAmmoHandler(std::shared_ptr<Ship::Console> Console, const std::v
|
|||||||
}
|
}
|
||||||
|
|
||||||
const static std::map<std::string, uint16_t> bottleItems{
|
const static std::map<std::string, uint16_t> bottleItems{
|
||||||
{ "green_potion", ITEM_POTION_GREEN },
|
{ "green_potion", ITEM_POTION_GREEN }, { "red_potion", ITEM_POTION_RED }, { "blue_potion", ITEM_POTION_BLUE },
|
||||||
{ "red_potion", ITEM_POTION_RED },
|
{ "milk", ITEM_MILK }, { "half_milk", ITEM_MILK_HALF }, { "fairy", ITEM_FAIRY },
|
||||||
{ "blue_potion", ITEM_POTION_BLUE },
|
{ "bugs", ITEM_BUG }, { "fish", ITEM_FISH }, { "poe", ITEM_POE },
|
||||||
{ "milk", ITEM_MILK }, { "half_milk", ITEM_MILK_HALF }, { "fairy", ITEM_FAIRY },
|
{ "big_poe", ITEM_BIG_POE }, { "blue_fire", ITEM_BLUE_FIRE }, { "rutos_letter", ITEM_LETTER_RUTO },
|
||||||
{ "bugs", ITEM_BUG }, { "fish", ITEM_FISH }, { "poe", ITEM_POE },
|
|
||||||
{ "big_poe", ITEM_BIG_POE }, { "blue_fire", ITEM_BLUE_FIRE }, { "rutos_letter", ITEM_LETTER_RUTO },
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static bool BottleHandler(std::shared_ptr<Ship::Console> Console, const std::vector<std::string>& args) {
|
static bool BottleHandler(std::shared_ptr<Ship::Console> Console, const std::vector<std::string>& args) {
|
||||||
@ -418,7 +416,7 @@ static bool ReloadHandler(std::shared_ptr<Ship::Console> Console, const std::vec
|
|||||||
}
|
}
|
||||||
|
|
||||||
const static std::map<std::string, uint16_t> fw_options {
|
const static std::map<std::string, uint16_t> fw_options {
|
||||||
{ "clear", 0}, {"warp", 1}, {"nackup", 2}
|
{ "clear", 0}, {"warp", 1}, {"backup", 2}
|
||||||
};
|
};
|
||||||
|
|
||||||
static bool FWHandler(std::shared_ptr<Ship::Console> Console, const std::vector<std::string>& args) {
|
static bool FWHandler(std::shared_ptr<Ship::Console> Console, const std::vector<std::string>& args) {
|
||||||
@ -1430,13 +1428,13 @@ void DebugConsole_Init(void) {
|
|||||||
}});
|
}});
|
||||||
|
|
||||||
CMD_REGISTER("spawn", { ActorSpawnHandler, "Spawn an actor.", { { "actor_id", Ship::ArgumentType::NUMBER },
|
CMD_REGISTER("spawn", { ActorSpawnHandler, "Spawn an actor.", { { "actor_id", Ship::ArgumentType::NUMBER },
|
||||||
{ "data", Ship::ArgumentType::NUMBER },
|
{ "data", Ship::ArgumentType::NUMBER },
|
||||||
{ "x", Ship::ArgumentType::PLAYER_POS, true },
|
{ "x", Ship::ArgumentType::PLAYER_POS, true },
|
||||||
{ "y", Ship::ArgumentType::PLAYER_POS, true },
|
{ "y", Ship::ArgumentType::PLAYER_POS, true },
|
||||||
{ "z", Ship::ArgumentType::PLAYER_POS, true },
|
{ "z", Ship::ArgumentType::PLAYER_POS, true },
|
||||||
{ "rx", Ship::ArgumentType::PLAYER_ROT, true },
|
{ "rx", Ship::ArgumentType::PLAYER_ROT, true },
|
||||||
{ "ry", Ship::ArgumentType::PLAYER_ROT, true },
|
{ "ry", Ship::ArgumentType::PLAYER_ROT, true },
|
||||||
{ "rz", Ship::ArgumentType::PLAYER_ROT, true }
|
{ "rz", Ship::ArgumentType::PLAYER_ROT, true }
|
||||||
}});
|
}});
|
||||||
|
|
||||||
CMD_REGISTER("pos", { SetPosHandler, "Sets the position of the player.", {
|
CMD_REGISTER("pos", { SetPosHandler, "Sets the position of the player.", {
|
||||||
|
@ -18,7 +18,7 @@ extern PlayState* gPlayState;
|
|||||||
|
|
||||||
enum class ColRenderSetting { Disabled, Solid, Transparent };
|
enum class ColRenderSetting { Disabled, Solid, Transparent };
|
||||||
|
|
||||||
std::vector<std::string> ColRenderSettingNames = {
|
static const char* ColRenderSettingNames[] = {
|
||||||
"Disabled",
|
"Disabled",
|
||||||
"Solid",
|
"Solid",
|
||||||
"Transparent",
|
"Transparent",
|
||||||
@ -64,10 +64,10 @@ void DrawColViewerWindow(bool& open) {
|
|||||||
}
|
}
|
||||||
UIWidgets::EnhancementCheckbox("Enabled", "gColViewerEnabled");
|
UIWidgets::EnhancementCheckbox("Enabled", "gColViewerEnabled");
|
||||||
|
|
||||||
UIWidgets::EnhancementCombo("Scene", "gColViewerScene", ColRenderSettingNames);
|
UIWidgets::LabeledRightAlignedEnhancementCombobox("Scene", "gColViewerScene", ColRenderSettingNames, 0);
|
||||||
UIWidgets::EnhancementCombo("Bg Actors", "gColViewerBgActors", ColRenderSettingNames);
|
UIWidgets::LabeledRightAlignedEnhancementCombobox("Bg Actors", "gColViewerBgActors", ColRenderSettingNames, 0);
|
||||||
UIWidgets::EnhancementCombo("Col Check", "gColViewerColCheck", ColRenderSettingNames);
|
UIWidgets::LabeledRightAlignedEnhancementCombobox("Col Check", "gColViewerColCheck", ColRenderSettingNames, 0);
|
||||||
UIWidgets::EnhancementCombo("Waterbox", "gColViewerWaterbox", ColRenderSettingNames);
|
UIWidgets::LabeledRightAlignedEnhancementCombobox("Waterbox", "gColViewerWaterbox", ColRenderSettingNames, 0);
|
||||||
|
|
||||||
UIWidgets::EnhancementCheckbox("Apply as decal", "gColViewerDecal");
|
UIWidgets::EnhancementCheckbox("Apply as decal", "gColViewerDecal");
|
||||||
UIWidgets::InsertHelpHoverText("Applies the collision as a decal display. This can be useful if there is z-fighting occuring "
|
UIWidgets::InsertHelpHoverText("Applies the collision as a decal display. This can be useful if there is z-fighting occuring "
|
||||||
|
@ -323,7 +323,7 @@ void DrawStatsTracker(bool& open) {
|
|||||||
ImGui::Text("Display Mode");
|
ImGui::Text("Display Mode");
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
ImGui::SetNextItemWidth(ImGui::GetFontSize() * 8);
|
ImGui::SetNextItemWidth(ImGui::GetFontSize() * 8);
|
||||||
UIWidgets::EnhancementCombobox("gGameplayStatsMode", gameplayStatsModeOptions, 3, 0);
|
UIWidgets::EnhancementCombobox("gGameplayStatsMode", gameplayStatsModeOptions, 0);
|
||||||
|
|
||||||
ImGui::Text("Note: Gameplay stats are saved to the current file and will be\nlost if you quit without saving.");
|
ImGui::Text("Note: Gameplay stats are saved to the current file and will be\nlost if you quit without saving.");
|
||||||
|
|
||||||
|
@ -105,7 +105,7 @@ static const char* frenchRupeeNames[36] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
Randomizer::Randomizer() {
|
Randomizer::Randomizer() {
|
||||||
for (auto [randomizerCheck, rcObject] : RandomizerCheckObjects::GetAllRCObjects()) {
|
for (auto& [randomizerCheck, rcObject] : RandomizerCheckObjects::GetAllRCObjects()) {
|
||||||
SpoilerfileCheckNameToEnum[rcObject.rcSpoilerName] = rcObject.rc;
|
SpoilerfileCheckNameToEnum[rcObject.rcSpoilerName] = rcObject.rc;
|
||||||
checkFromActorMultimap.emplace(std::make_tuple((s16)rcObject.actorId, (s16)rcObject.sceneId, rcObject.actorParams), rcObject);
|
checkFromActorMultimap.emplace(std::make_tuple((s16)rcObject.actorId, (s16)rcObject.sceneId, rcObject.actorParams), rcObject);
|
||||||
}
|
}
|
||||||
@ -165,46 +165,47 @@ std::unordered_map<std::string, SceneID> spoilerFileDungeonToScene = {
|
|||||||
{ "Ganon's Castle", SCENE_GANONTIKA }
|
{ "Ganon's Castle", SCENE_GANONTIKA }
|
||||||
};
|
};
|
||||||
|
|
||||||
std::unordered_map<s16, s16>
|
std::unordered_map<s16, s16> getItemIdToItemId = {
|
||||||
getItemIdToItemId = { { GI_BOW, ITEM_BOW },
|
{ GI_BOW, ITEM_BOW },
|
||||||
{ GI_ARROW_FIRE, ITEM_ARROW_FIRE },
|
{ GI_ARROW_FIRE, ITEM_ARROW_FIRE },
|
||||||
{ GI_DINS_FIRE, ITEM_DINS_FIRE },
|
{ GI_DINS_FIRE, ITEM_DINS_FIRE },
|
||||||
{ GI_SLINGSHOT, ITEM_SLINGSHOT },
|
{ GI_SLINGSHOT, ITEM_SLINGSHOT },
|
||||||
{ GI_OCARINA_FAIRY, ITEM_OCARINA_FAIRY },
|
{ GI_OCARINA_FAIRY, ITEM_OCARINA_FAIRY },
|
||||||
{ GI_OCARINA_OOT, ITEM_OCARINA_TIME },
|
{ GI_OCARINA_OOT, ITEM_OCARINA_TIME },
|
||||||
{ GI_HOOKSHOT, ITEM_HOOKSHOT },
|
{ GI_HOOKSHOT, ITEM_HOOKSHOT },
|
||||||
{ GI_LONGSHOT, ITEM_LONGSHOT },
|
{ GI_LONGSHOT, ITEM_LONGSHOT },
|
||||||
{ GI_ARROW_ICE, ITEM_ARROW_ICE },
|
{ GI_ARROW_ICE, ITEM_ARROW_ICE },
|
||||||
{ GI_FARORES_WIND, ITEM_FARORES_WIND },
|
{ GI_FARORES_WIND, ITEM_FARORES_WIND },
|
||||||
{ GI_BOOMERANG, ITEM_BOOMERANG },
|
{ GI_BOOMERANG, ITEM_BOOMERANG },
|
||||||
{ GI_LENS, ITEM_LENS },
|
{ GI_LENS, ITEM_LENS },
|
||||||
{ GI_HAMMER, ITEM_HAMMER },
|
{ GI_HAMMER, ITEM_HAMMER },
|
||||||
{ GI_ARROW_LIGHT, ITEM_ARROW_LIGHT },
|
{ GI_ARROW_LIGHT, ITEM_ARROW_LIGHT },
|
||||||
{ GI_NAYRUS_LOVE, ITEM_NAYRUS_LOVE },
|
{ GI_NAYRUS_LOVE, ITEM_NAYRUS_LOVE },
|
||||||
{ GI_BOTTLE, ITEM_BOTTLE },
|
{ GI_BOTTLE, ITEM_BOTTLE },
|
||||||
{ GI_POTION_RED, ITEM_POTION_RED },
|
{ GI_POTION_RED, ITEM_POTION_RED },
|
||||||
{ GI_POTION_GREEN, ITEM_POTION_GREEN },
|
{ GI_POTION_GREEN, ITEM_POTION_GREEN },
|
||||||
{ GI_POTION_BLUE, ITEM_POTION_BLUE },
|
{ GI_POTION_BLUE, ITEM_POTION_BLUE },
|
||||||
{ GI_FAIRY, ITEM_FAIRY },
|
{ GI_FAIRY, ITEM_FAIRY },
|
||||||
{ GI_FISH, ITEM_FISH },
|
{ GI_FISH, ITEM_FISH },
|
||||||
{ GI_MILK_BOTTLE, ITEM_MILK_BOTTLE },
|
{ GI_MILK_BOTTLE, ITEM_MILK_BOTTLE },
|
||||||
{ GI_LETTER_RUTO, ITEM_LETTER_RUTO },
|
{ GI_LETTER_RUTO, ITEM_LETTER_RUTO },
|
||||||
{ GI_BLUE_FIRE, ITEM_BLUE_FIRE },
|
{ GI_BLUE_FIRE, ITEM_BLUE_FIRE },
|
||||||
{ GI_BUGS, ITEM_BUG },
|
{ GI_BUGS, ITEM_BUG },
|
||||||
{ GI_BIG_POE, ITEM_BIG_POE },
|
{ GI_BIG_POE, ITEM_BIG_POE },
|
||||||
{ GI_POE, ITEM_POE },
|
{ GI_POE, ITEM_POE },
|
||||||
{ GI_WEIRD_EGG, ITEM_WEIRD_EGG },
|
{ GI_WEIRD_EGG, ITEM_WEIRD_EGG },
|
||||||
{ GI_LETTER_ZELDA, ITEM_LETTER_ZELDA },
|
{ GI_LETTER_ZELDA, ITEM_LETTER_ZELDA },
|
||||||
{ GI_POCKET_EGG, ITEM_POCKET_EGG },
|
{ GI_POCKET_EGG, ITEM_POCKET_EGG },
|
||||||
{ GI_COJIRO, ITEM_COJIRO },
|
{ GI_COJIRO, ITEM_COJIRO },
|
||||||
{ GI_ODD_MUSHROOM, ITEM_ODD_MUSHROOM },
|
{ GI_ODD_MUSHROOM, ITEM_ODD_MUSHROOM },
|
||||||
{ GI_ODD_POTION, ITEM_ODD_POTION },
|
{ GI_ODD_POTION, ITEM_ODD_POTION },
|
||||||
{ GI_SAW, ITEM_SAW },
|
{ GI_SAW, ITEM_SAW },
|
||||||
{ GI_SWORD_BROKEN, ITEM_SWORD_BROKEN },
|
{ GI_SWORD_BROKEN, ITEM_SWORD_BROKEN },
|
||||||
{ GI_PRESCRIPTION, ITEM_PRESCRIPTION },
|
{ GI_PRESCRIPTION, ITEM_PRESCRIPTION },
|
||||||
{ GI_FROG, ITEM_FROG },
|
{ GI_FROG, ITEM_FROG },
|
||||||
{ GI_EYEDROPS, ITEM_EYEDROPS },
|
{ GI_EYEDROPS, ITEM_EYEDROPS },
|
||||||
{ GI_CLAIM_CHECK, ITEM_CLAIM_CHECK } };
|
{ GI_CLAIM_CHECK, ITEM_CLAIM_CHECK }
|
||||||
|
};
|
||||||
|
|
||||||
std::unordered_map<std::string, RandomizerSettingKey> SpoilerfileSettingNameToEnum = {
|
std::unordered_map<std::string, RandomizerSettingKey> SpoilerfileSettingNameToEnum = {
|
||||||
{ "Detailed Logic Settings:Logic", RSK_LOGIC_RULES },
|
{ "Detailed Logic Settings:Logic", RSK_LOGIC_RULES },
|
||||||
@ -368,7 +369,7 @@ void Randomizer::LoadRandomizerSettings(const char* spoilerFileName) {
|
|||||||
ParseRandomizerSettingsFile(spoilerFileName);
|
ParseRandomizerSettingsFile(spoilerFileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
for(auto randoSetting : gSaveContext.randoSettings) {
|
for(auto& randoSetting : gSaveContext.randoSettings) {
|
||||||
this->randoSettings[randoSetting.key] = randoSetting.value;
|
this->randoSettings[randoSetting.key] = randoSetting.value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -403,7 +404,7 @@ void Randomizer::LoadHintLocations(const char* spoilerFileName) {
|
|||||||
this->ganonHintText = gSaveContext.ganonHintText;
|
this->ganonHintText = gSaveContext.ganonHintText;
|
||||||
this->ganonText = gSaveContext.ganonText;
|
this->ganonText = gSaveContext.ganonText;
|
||||||
|
|
||||||
for (auto hintLocation : gSaveContext.hintLocations) {
|
for (const auto& hintLocation : gSaveContext.hintLocations) {
|
||||||
if(hintLocation.check == RC_LINKS_POCKET) break;
|
if(hintLocation.check == RC_LINKS_POCKET) break;
|
||||||
this->hintLocations[hintLocation.check] = hintLocation.hintText;
|
this->hintLocations[hintLocation.check] = hintLocation.hintText;
|
||||||
CustomMessageManager::Instance->CreateMessage(
|
CustomMessageManager::Instance->CreateMessage(
|
||||||
@ -602,7 +603,7 @@ void Randomizer::LoadItemLocations(const char* spoilerFileName, bool silent) {
|
|||||||
ParseItemLocationsFile(spoilerFileName, silent);
|
ParseItemLocationsFile(spoilerFileName, silent);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (auto itemLocation : gSaveContext.itemLocations) {
|
for (auto& itemLocation : gSaveContext.itemLocations) {
|
||||||
this->itemLocations[itemLocation.check] = itemLocation.get;
|
this->itemLocations[itemLocation.check] = itemLocation.get;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3030,7 +3031,7 @@ void GenerateRandomizerImgui(std::string seed = "") {
|
|||||||
RandomizerCheckObjects::UpdateImGuiVisibility();
|
RandomizerCheckObjects::UpdateImGuiVisibility();
|
||||||
|
|
||||||
// Remove excludes for locations that are no longer allowed to be excluded
|
// Remove excludes for locations that are no longer allowed to be excluded
|
||||||
for (auto [randomizerCheck, rcObject] : RandomizerCheckObjects::GetAllRCObjects()) {
|
for (auto& [randomizerCheck, rcObject] : RandomizerCheckObjects::GetAllRCObjects()) {
|
||||||
auto elfound = excludedLocations.find(rcObject.rc);
|
auto elfound = excludedLocations.find(rcObject.rc);
|
||||||
if (!rcObject.visibleInImgui && elfound != excludedLocations.end()) {
|
if (!rcObject.visibleInImgui && elfound != excludedLocations.end()) {
|
||||||
excludedLocations.erase(elfound);
|
excludedLocations.erase(elfound);
|
||||||
@ -3075,8 +3076,8 @@ void DrawRandoEditor(bool& open) {
|
|||||||
static const char* randoDoorOfTime[3] = { "Closed", "Song only", "Open" };
|
static const char* randoDoorOfTime[3] = { "Closed", "Song only", "Open" };
|
||||||
static const char* randoZorasFountain[3] = { "Closed", "Closed as child", "Open" };
|
static const char* randoZorasFountain[3] = { "Closed", "Closed as child", "Open" };
|
||||||
static const char* randoGerudoFortress[3] = { "Normal", "Fast", "Open" };
|
static const char* randoGerudoFortress[3] = { "Normal", "Fast", "Open" };
|
||||||
static const char* randoRainbowBridge[8] = { "Vanilla", "Always open", "Stones", "Medallions",
|
static const char* randoRainbowBridge[8] = { "Vanilla", "Always open", "Stones", "Medallions",
|
||||||
"Dungeon rewards", "Dungeons", "Tokens", "Greg" };
|
"Dungeon rewards", "Dungeons", "Tokens", "Greg" };
|
||||||
static const char* randoGanonsTrial[3] = { "Skip", "Set Number", "Random Number" };
|
static const char* randoGanonsTrial[3] = { "Skip", "Set Number", "Random Number" };
|
||||||
static const char* randoMqDungeons[3] = { "None", "Set Number", "Random Number" };
|
static const char* randoMqDungeons[3] = { "None", "Set Number", "Random Number" };
|
||||||
|
|
||||||
@ -3132,8 +3133,9 @@ void DrawRandoEditor(bool& open) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool disableEditingRandoSettings = CVarGetInteger("gRandoGenerating", 0) || CVarGetInteger("gOnFileSelectNameEntry", 0);
|
bool disableEditingRandoSettings = CVarGetInteger("gRandoGenerating", 0) || CVarGetInteger("gOnFileSelectNameEntry", 0);
|
||||||
ImGui::PushItemFlag(ImGuiItemFlags_Disabled, disableEditingRandoSettings);
|
if (disableEditingRandoSettings) {
|
||||||
ImGui::PushStyleVar(ImGuiStyleVar_Alpha, ImGui::GetStyle().Alpha * (disableEditingRandoSettings ? 0.5f : 1.0f));
|
UIWidgets::DisableComponent(ImGui::GetStyle().Alpha * 0.5f);
|
||||||
|
}
|
||||||
|
|
||||||
DrawPresetSelector(PRESET_TYPE_RANDOMIZER);
|
DrawPresetSelector(PRESET_TYPE_RANDOMIZER);
|
||||||
|
|
||||||
@ -3207,7 +3209,7 @@ void DrawRandoEditor(bool& open) {
|
|||||||
"Open - Mido no longer blocks the path to the Deku Tree. Kokiri "
|
"Open - Mido no longer blocks the path to the Deku Tree. Kokiri "
|
||||||
"boy no longer blocks the path out of the forest."
|
"boy no longer blocks the path out of the forest."
|
||||||
);
|
);
|
||||||
UIWidgets::EnhancementCombobox("gRandomizeForest", randoForest, RO_FOREST_MAX, RO_FOREST_CLOSED);
|
UIWidgets::EnhancementCombobox("gRandomizeForest", randoForest, RO_FOREST_CLOSED);
|
||||||
|
|
||||||
UIWidgets::PaddedSeparator();
|
UIWidgets::PaddedSeparator();
|
||||||
|
|
||||||
@ -3220,7 +3222,7 @@ void DrawRandoEditor(bool& open) {
|
|||||||
"Open - The gate is always open. The happy mask shop "
|
"Open - The gate is always open. The happy mask shop "
|
||||||
"will open immediately after obtaining Zelda's letter."
|
"will open immediately after obtaining Zelda's letter."
|
||||||
);
|
);
|
||||||
UIWidgets::EnhancementCombobox("gRandomizeKakarikoGate", randoKakarikoGate, RO_KAK_GATE_MAX, RO_KAK_GATE_CLOSED);
|
UIWidgets::EnhancementCombobox("gRandomizeKakarikoGate", randoKakarikoGate, RO_KAK_GATE_CLOSED);
|
||||||
|
|
||||||
UIWidgets::PaddedSeparator();
|
UIWidgets::PaddedSeparator();
|
||||||
|
|
||||||
@ -3235,7 +3237,7 @@ void DrawRandoEditor(bool& open) {
|
|||||||
"\n"
|
"\n"
|
||||||
"Open - The Door of Time is permanently open with no requirements."
|
"Open - The Door of Time is permanently open with no requirements."
|
||||||
);
|
);
|
||||||
UIWidgets::EnhancementCombobox("gRandomizeDoorOfTime", randoDoorOfTime, RO_DOOROFTIME_MAX, RO_DOOROFTIME_CLOSED);
|
UIWidgets::EnhancementCombobox("gRandomizeDoorOfTime", randoDoorOfTime, RO_DOOROFTIME_CLOSED);
|
||||||
|
|
||||||
UIWidgets::PaddedSeparator();
|
UIWidgets::PaddedSeparator();
|
||||||
|
|
||||||
@ -3252,7 +3254,7 @@ void DrawRandoEditor(bool& open) {
|
|||||||
"Open - King Zora has already mweeped out of the way in both "
|
"Open - King Zora has already mweeped out of the way in both "
|
||||||
"time periods. Ruto's Letter is removed from the item pool."
|
"time periods. Ruto's Letter is removed from the item pool."
|
||||||
);
|
);
|
||||||
UIWidgets::EnhancementCombobox("gRandomizeZorasFountain", randoZorasFountain, RO_ZF_MAX, RO_ZF_CLOSED);
|
UIWidgets::EnhancementCombobox("gRandomizeZorasFountain", randoZorasFountain, RO_ZF_CLOSED);
|
||||||
|
|
||||||
UIWidgets::PaddedSeparator();
|
UIWidgets::PaddedSeparator();
|
||||||
|
|
||||||
@ -3277,7 +3279,7 @@ void DrawRandoEditor(bool& open) {
|
|||||||
"Starting as adult means you start with the Master Sword in your inventory.\n"
|
"Starting as adult means you start with the Master Sword in your inventory.\n"
|
||||||
"The child option is forcefully set if it would conflict with other options."
|
"The child option is forcefully set if it would conflict with other options."
|
||||||
);
|
);
|
||||||
UIWidgets::EnhancementCombobox("gRandomizeStartingAge", randoStartingAge, RO_AGE_MAX, RO_AGE_CHILD, disableRandoStartingAge, disableRandoStartingAgeText, RO_AGE_CHILD);
|
UIWidgets::EnhancementCombobox("gRandomizeStartingAge", randoStartingAge, RO_AGE_CHILD, disableRandoStartingAge, disableRandoStartingAgeText, RO_AGE_CHILD);
|
||||||
|
|
||||||
UIWidgets::PaddedSeparator();
|
UIWidgets::PaddedSeparator();
|
||||||
|
|
||||||
@ -3293,7 +3295,7 @@ void DrawRandoEditor(bool& open) {
|
|||||||
"\n"
|
"\n"
|
||||||
"Open - The bridge is repaired from the start."
|
"Open - The bridge is repaired from the start."
|
||||||
);
|
);
|
||||||
UIWidgets::EnhancementCombobox("gRandomizeGerudoFortress", randoGerudoFortress, RO_GF_MAX, RO_GF_NORMAL);
|
UIWidgets::EnhancementCombobox("gRandomizeGerudoFortress", randoGerudoFortress, RO_GF_NORMAL);
|
||||||
|
|
||||||
UIWidgets::PaddedSeparator();
|
UIWidgets::PaddedSeparator();
|
||||||
|
|
||||||
@ -3322,7 +3324,7 @@ void DrawRandoEditor(bool& open) {
|
|||||||
"Greg - Find Greg the Green Rupee."
|
"Greg - Find Greg the Green Rupee."
|
||||||
);
|
);
|
||||||
|
|
||||||
UIWidgets::EnhancementCombobox("gRandomizeRainbowBridge", randoRainbowBridge, RO_BRIDGE_MAX, RO_BRIDGE_VANILLA);
|
UIWidgets::EnhancementCombobox("gRandomizeRainbowBridge", randoRainbowBridge, RO_BRIDGE_VANILLA);
|
||||||
ImGui::PopItemWidth();
|
ImGui::PopItemWidth();
|
||||||
switch (CVarGetInteger("gRandomizeRainbowBridge", RO_BRIDGE_VANILLA)) {
|
switch (CVarGetInteger("gRandomizeRainbowBridge", RO_BRIDGE_VANILLA)) {
|
||||||
case RO_BRIDGE_ALWAYS_OPEN:
|
case RO_BRIDGE_ALWAYS_OPEN:
|
||||||
@ -3330,29 +3332,24 @@ void DrawRandoEditor(bool& open) {
|
|||||||
case RO_BRIDGE_VANILLA:
|
case RO_BRIDGE_VANILLA:
|
||||||
break;
|
break;
|
||||||
case RO_BRIDGE_STONES:
|
case RO_BRIDGE_STONES:
|
||||||
ImGui::Dummy(ImVec2(0.0f, 0.0f));
|
UIWidgets::PaddedEnhancementSliderInt("Stone Count: %d", "##RandoStoneCount",
|
||||||
UIWidgets::EnhancementSliderInt("Stone Count: %d", "##RandoStoneCount",
|
"gRandomizeStoneCount", 1, 3, "", 3, true, true, false);
|
||||||
"gRandomizeStoneCount", 1, 3, "", 3, true);
|
|
||||||
break;
|
break;
|
||||||
case RO_BRIDGE_MEDALLIONS:
|
case RO_BRIDGE_MEDALLIONS:
|
||||||
ImGui::Dummy(ImVec2(0.0f, 0.0f));
|
UIWidgets::PaddedEnhancementSliderInt("Medallion Count: %d", "##RandoMedallionCount",
|
||||||
UIWidgets::EnhancementSliderInt("Medallion Count: %d", "##RandoMedallionCount",
|
"gRandomizeMedallionCount", 1, 6, "", 6, true, true, false);
|
||||||
"gRandomizeMedallionCount", 1, 6, "", 6, true);
|
|
||||||
break;
|
break;
|
||||||
case RO_BRIDGE_DUNGEON_REWARDS:
|
case RO_BRIDGE_DUNGEON_REWARDS:
|
||||||
ImGui::Dummy(ImVec2(0.0f, 0.0f));
|
UIWidgets::PaddedEnhancementSliderInt("Reward Count: %d", "##RandoRewardCount",
|
||||||
UIWidgets::EnhancementSliderInt("Reward Count: %d", "##RandoRewardCount",
|
"gRandomizeRewardCount", 1, 9, "", 9, true, true, false);
|
||||||
"gRandomizeRewardCount", 1, 9, "", 9, true);
|
|
||||||
break;
|
break;
|
||||||
case RO_BRIDGE_DUNGEONS:
|
case RO_BRIDGE_DUNGEONS:
|
||||||
ImGui::Dummy(ImVec2(0.0f, 0.0f));
|
UIWidgets::PaddedEnhancementSliderInt("Dungeon Count: %d", "##RandoDungeonCount",
|
||||||
UIWidgets::EnhancementSliderInt("Dungeon Count: %d", "##RandoDungeonCount",
|
"gRandomizeDungeonCount", 1, 8, "", 8, true, true, false);
|
||||||
"gRandomizeDungeonCount", 1, 8, "", 8, true);
|
|
||||||
break;
|
break;
|
||||||
case RO_BRIDGE_TOKENS:
|
case RO_BRIDGE_TOKENS:
|
||||||
ImGui::Dummy(ImVec2(0.0f, 0.0f));
|
UIWidgets::PaddedEnhancementSliderInt("Token Count: %d", "##RandoTokenCount",
|
||||||
UIWidgets::EnhancementSliderInt("Token Count: %d", "##RandoTokenCount",
|
"gRandomizeTokenCount", 1, 100, "", 100, true, true, false);
|
||||||
"gRandomizeTokenCount", 1, 100, "", 100, true);
|
|
||||||
break;
|
break;
|
||||||
case RO_BRIDGE_GREG:
|
case RO_BRIDGE_GREG:
|
||||||
break;
|
break;
|
||||||
@ -3373,12 +3370,11 @@ void DrawRandoEditor(bool& open) {
|
|||||||
"\n"
|
"\n"
|
||||||
"Random Number - A Random number and set of trials will be required."
|
"Random Number - A Random number and set of trials will be required."
|
||||||
);
|
);
|
||||||
UIWidgets::EnhancementCombobox("gRandomizeGanonTrial", randoGanonsTrial, RO_GANONS_TRIALS_MAX, RO_GANONS_TRIALS_SET_NUMBER);
|
UIWidgets::EnhancementCombobox("gRandomizeGanonTrial", randoGanonsTrial, RO_GANONS_TRIALS_SET_NUMBER);
|
||||||
ImGui::PopItemWidth();
|
ImGui::PopItemWidth();
|
||||||
if (CVarGetInteger("gRandomizeGanonTrial", RO_GANONS_TRIALS_SET_NUMBER) == RO_GANONS_TRIALS_SET_NUMBER) {
|
if (CVarGetInteger("gRandomizeGanonTrial", RO_GANONS_TRIALS_SET_NUMBER) == RO_GANONS_TRIALS_SET_NUMBER) {
|
||||||
ImGui::Dummy(ImVec2(0.0f, 0.0f));
|
UIWidgets::PaddedEnhancementSliderInt("Ganon's Trial Count: %d", "##RandoTrialCount",
|
||||||
UIWidgets::EnhancementSliderInt("Ganon's Trial Count: %d", "##RandoTrialCount",
|
"gRandomizeGanonTrialCount", 1, 6, "", 6, true, true, false);
|
||||||
"gRandomizeGanonTrialCount", 1, 6, "", 6, true);
|
|
||||||
UIWidgets::InsertHelpHoverText("Set the number of trials required to enter Ganon's Tower.");
|
UIWidgets::InsertHelpHoverText("Set the number of trials required to enter Ganon's Tower.");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3397,12 +3393,11 @@ void DrawRandoEditor(bool& open) {
|
|||||||
"\n"
|
"\n"
|
||||||
"Random Number - A Random number and set of dungeons will be their Master Quest varieties."
|
"Random Number - A Random number and set of dungeons will be their Master Quest varieties."
|
||||||
);
|
);
|
||||||
UIWidgets::EnhancementCombobox("gRandomizeMqDungeons", randoMqDungeons, RO_MQ_DUNGEONS_MAX, RO_MQ_DUNGEONS_NONE);
|
UIWidgets::EnhancementCombobox("gRandomizeMqDungeons", randoMqDungeons, RO_MQ_DUNGEONS_NONE);
|
||||||
ImGui::PopItemWidth();
|
ImGui::PopItemWidth();
|
||||||
if (CVarGetInteger("gRandomizeMqDungeons", RO_MQ_DUNGEONS_NONE) == RO_MQ_DUNGEONS_SET_NUMBER) {
|
if (CVarGetInteger("gRandomizeMqDungeons", RO_MQ_DUNGEONS_NONE) == RO_MQ_DUNGEONS_SET_NUMBER) {
|
||||||
ImGui::Dummy(ImVec2(0.0f, 0.0f));
|
UIWidgets::PaddedEnhancementSliderInt("Master Quest Dungeon Count: %d", "##RandoMqDungeonCount",
|
||||||
UIWidgets::EnhancementSliderInt("Master Quest Dungeon Count: %d", "##RandoMqDungeonCount",
|
"gRandomizeMqDungeonCount", 1, 12, "", CVarGetInteger("gRandomizeMqDungeonCount", 12), true, true, false);
|
||||||
"gRandomizeMqDungeonCount", 1, 12, "", CVarGetInteger("gRandomizeMqDungeonCount", 12), true);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3427,7 +3422,7 @@ void DrawRandoEditor(bool& open) {
|
|||||||
"- Bottom of the Well will be open for adult after playing Song of Storms to the Windmill guy as child.\n"
|
"- Bottom of the Well will be open for adult after playing Song of Storms to the Windmill guy as child.\n"
|
||||||
"- Gerudo Training Ground will be open for child after adult has paid to open the gate once."
|
"- Gerudo Training Ground will be open for child after adult has paid to open the gate once."
|
||||||
);
|
);
|
||||||
UIWidgets::EnhancementCombobox("gRandomizeShuffleDungeonsEntrances", randoShuffleDungeonsEntrances, RO_DUNGEON_ENTRANCE_SHUFFLE_MAX, RO_DUNGEON_ENTRANCE_SHUFFLE_OFF);
|
UIWidgets::EnhancementCombobox("gRandomizeShuffleDungeonsEntrances", randoShuffleDungeonsEntrances, RO_DUNGEON_ENTRANCE_SHUFFLE_OFF);
|
||||||
|
|
||||||
UIWidgets::PaddedSeparator();
|
UIWidgets::PaddedSeparator();
|
||||||
|
|
||||||
@ -3440,7 +3435,7 @@ void DrawRandoEditor(bool& open) {
|
|||||||
"\n"
|
"\n"
|
||||||
"Full - Shuffle the entrances of all boss rooms together. Child may be expected to defeat Phantom Ganon and/or Bongo Bongo."
|
"Full - Shuffle the entrances of all boss rooms together. Child may be expected to defeat Phantom Ganon and/or Bongo Bongo."
|
||||||
);
|
);
|
||||||
UIWidgets::EnhancementCombobox("gRandomizeShuffleBossEntrances", randoShuffleBossEntrances, RO_BOSS_ROOM_ENTRANCE_SHUFFLE_MAX, RO_BOSS_ROOM_ENTRANCE_SHUFFLE_OFF);
|
UIWidgets::EnhancementCombobox("gRandomizeShuffleBossEntrances", randoShuffleBossEntrances, RO_BOSS_ROOM_ENTRANCE_SHUFFLE_OFF);
|
||||||
|
|
||||||
UIWidgets::PaddedSeparator();
|
UIWidgets::PaddedSeparator();
|
||||||
|
|
||||||
@ -3468,7 +3463,7 @@ void DrawRandoEditor(bool& open) {
|
|||||||
"- Temple of Time\n"
|
"- Temple of Time\n"
|
||||||
"- Kakariko Potion Shop"
|
"- Kakariko Potion Shop"
|
||||||
);
|
);
|
||||||
UIWidgets::EnhancementCombobox("gRandomizeShuffleInteriorsEntrances", randoShuffleInteriorsEntrances, RO_INTERIOR_ENTRANCE_SHUFFLE_MAX, RO_INTERIOR_ENTRANCE_SHUFFLE_OFF);
|
UIWidgets::EnhancementCombobox("gRandomizeShuffleInteriorsEntrances", randoShuffleInteriorsEntrances, RO_INTERIOR_ENTRANCE_SHUFFLE_OFF);
|
||||||
|
|
||||||
UIWidgets::PaddedSeparator();
|
UIWidgets::PaddedSeparator();
|
||||||
|
|
||||||
@ -3600,7 +3595,7 @@ void DrawRandoEditor(bool& open) {
|
|||||||
"\n"
|
"\n"
|
||||||
"Anywhere - Songs can appear at any location."
|
"Anywhere - Songs can appear at any location."
|
||||||
);
|
);
|
||||||
UIWidgets::EnhancementCombobox("gRandomizeShuffleSongs", randoShuffleSongs, RO_SONG_SHUFFLE_MAX, RO_SONG_SHUFFLE_SONG_LOCATIONS);
|
UIWidgets::EnhancementCombobox("gRandomizeShuffleSongs", randoShuffleSongs, RO_SONG_SHUFFLE_SONG_LOCATIONS);
|
||||||
|
|
||||||
UIWidgets::PaddedSeparator();
|
UIWidgets::PaddedSeparator();
|
||||||
|
|
||||||
@ -3618,11 +3613,9 @@ void DrawRandoEditor(bool& open) {
|
|||||||
"\n"
|
"\n"
|
||||||
"All Tokens - Shuffle all 100 GS tokens."
|
"All Tokens - Shuffle all 100 GS tokens."
|
||||||
);
|
);
|
||||||
UIWidgets::EnhancementCombobox("gRandomizeShuffleTokens", randoTokensanity, RO_TOKENSANITY_MAX, RO_TOKENSANITY_OFF);
|
UIWidgets::EnhancementCombobox("gRandomizeShuffleTokens", randoTokensanity, RO_TOKENSANITY_OFF);
|
||||||
|
|
||||||
ImGui::Dummy(ImVec2(0,0));
|
UIWidgets::PaddedEnhancementCheckbox("Nighttime GS expect Sun's Song", "gRandomizeGsExpectSunsSong", true, false);
|
||||||
|
|
||||||
UIWidgets::EnhancementCheckbox("Nighttime GS expect Sun's Song", "gRandomizeGsExpectSunsSong");
|
|
||||||
UIWidgets::InsertHelpHoverText(
|
UIWidgets::InsertHelpHoverText(
|
||||||
"All Golden Skulltulas that require nighttime to appear will only be "
|
"All Golden Skulltulas that require nighttime to appear will only be "
|
||||||
"expected to be collected after getting Sun's Song."
|
"expected to be collected after getting Sun's Song."
|
||||||
@ -3710,7 +3703,7 @@ void DrawRandoEditor(bool& open) {
|
|||||||
"\n"
|
"\n"
|
||||||
"Random - Vanilla shop items will be shuffled among different shops, and each shop will contain a random number(1-4) of non-vanilla shop items.\n"
|
"Random - Vanilla shop items will be shuffled among different shops, and each shop will contain a random number(1-4) of non-vanilla shop items.\n"
|
||||||
);
|
);
|
||||||
UIWidgets::EnhancementCombobox("gRandomizeShopsanity", randoShopsanity, RO_SHOPSANITY_MAX, RO_SHOPSANITY_OFF);
|
UIWidgets::EnhancementCombobox("gRandomizeShopsanity", randoShopsanity, RO_SHOPSANITY_OFF);
|
||||||
|
|
||||||
// Shopsanity Prices
|
// Shopsanity Prices
|
||||||
switch (CVarGetInteger("gRandomizeShopsanity", RO_SHOPSANITY_OFF)) {
|
switch (CVarGetInteger("gRandomizeShopsanity", RO_SHOPSANITY_OFF)) {
|
||||||
@ -3725,7 +3718,7 @@ void DrawRandoEditor(bool& open) {
|
|||||||
"\n"
|
"\n"
|
||||||
"X Wallet - Randomized between 5 and the wallet's max size, in multiples of 5"
|
"X Wallet - Randomized between 5 and the wallet's max size, in multiples of 5"
|
||||||
);
|
);
|
||||||
UIWidgets::EnhancementCombobox("gRandomizeShopsanityPrices", randoShopsanityPrices, RO_SHOPSANITY_PRICE_MAX, RO_SHOPSANITY_PRICE_BALANCED);
|
UIWidgets::EnhancementCombobox("gRandomizeShopsanityPrices", randoShopsanityPrices, RO_SHOPSANITY_PRICE_BALANCED);
|
||||||
UIWidgets::EnhancementCheckbox(Settings::ShopsanityPricesAffordable.GetName().c_str(), "gRandomizeShopsanityPricesAffordable",
|
UIWidgets::EnhancementCheckbox(Settings::ShopsanityPricesAffordable.GetName().c_str(), "gRandomizeShopsanityPricesAffordable",
|
||||||
CVarGetInteger("gRandomizeShopsanityPrices", RO_SHOPSANITY_PRICE_BALANCED) == RO_SHOPSANITY_PRICE_BALANCED,
|
CVarGetInteger("gRandomizeShopsanityPrices", RO_SHOPSANITY_PRICE_BALANCED) == RO_SHOPSANITY_PRICE_BALANCED,
|
||||||
"This can only apply to a wallet range.");
|
"This can only apply to a wallet range.");
|
||||||
@ -3747,7 +3740,7 @@ void DrawRandoEditor(bool& open) {
|
|||||||
"Expensive - Scrubs will be shuffled and their item will cost the vanilla price.\n"
|
"Expensive - Scrubs will be shuffled and their item will cost the vanilla price.\n"
|
||||||
"\n"
|
"\n"
|
||||||
"Random - Scrubs will be shuffled and their item will cost will be between 0-95 rupees.\n");
|
"Random - Scrubs will be shuffled and their item will cost will be between 0-95 rupees.\n");
|
||||||
UIWidgets::EnhancementCombobox("gRandomizeShuffleScrubs", randoShuffleScrubs, RO_SCRUBS_MAX, RO_SCRUBS_OFF);
|
UIWidgets::EnhancementCombobox("gRandomizeShuffleScrubs", randoShuffleScrubs, RO_SCRUBS_OFF);
|
||||||
|
|
||||||
UIWidgets::PaddedSeparator();
|
UIWidgets::PaddedSeparator();
|
||||||
|
|
||||||
@ -3774,7 +3767,7 @@ void DrawRandoEditor(bool& open) {
|
|||||||
"On (no hints) - Salesmen will be included but won't tell you what you'll get.\n"
|
"On (no hints) - Salesmen will be included but won't tell you what you'll get.\n"
|
||||||
"On (with hints) - Salesmen will be included and you'll know what you're buying."
|
"On (with hints) - Salesmen will be included and you'll know what you're buying."
|
||||||
);
|
);
|
||||||
UIWidgets::EnhancementCombobox("gRandomizeShuffleMerchants", randoShuffleMerchants, RO_SHUFFLE_MERCHANTS_MAX, RO_SHUFFLE_MERCHANTS_OFF);
|
UIWidgets::EnhancementCombobox("gRandomizeShuffleMerchants", randoShuffleMerchants, RO_SHUFFLE_MERCHANTS_OFF);
|
||||||
|
|
||||||
UIWidgets::PaddedSeparator();
|
UIWidgets::PaddedSeparator();
|
||||||
|
|
||||||
@ -3810,7 +3803,7 @@ void DrawRandoEditor(bool& open) {
|
|||||||
// Forcefully enabled if Ganon's Boss Key is on the cursed man
|
// Forcefully enabled if Ganon's Boss Key is on the cursed man
|
||||||
bool forceEnable100GSShuffle =
|
bool forceEnable100GSShuffle =
|
||||||
(CVarGetInteger("gRandomizeShuffleGanonBossKey", RO_GANON_BOSS_KEY_VANILLA) == RO_GANON_BOSS_KEY_KAK_TOKENS);
|
(CVarGetInteger("gRandomizeShuffleGanonBossKey", RO_GANON_BOSS_KEY_VANILLA) == RO_GANON_BOSS_KEY_KAK_TOKENS);
|
||||||
const char* disable100GSRewardText = "This option is forcefully enabled because \"Ganon's Boss Key\" is set to \"100 GS Reward.\"";
|
static const char* disable100GSRewardText = "This option is forcefully enabled because \"Ganon's Boss Key\" is set to \"100 GS Reward.\"";
|
||||||
UIWidgets::EnhancementCheckbox(Settings::Shuffle100GSReward.GetName().c_str(), "gRandomizeShuffle100GSReward",
|
UIWidgets::EnhancementCheckbox(Settings::Shuffle100GSReward.GetName().c_str(), "gRandomizeShuffle100GSReward",
|
||||||
forceEnable100GSShuffle, disable100GSRewardText, UIWidgets::CheckboxGraphics::Checkmark);
|
forceEnable100GSShuffle, disable100GSRewardText, UIWidgets::CheckboxGraphics::Checkmark);
|
||||||
UIWidgets::InsertHelpHoverText(
|
UIWidgets::InsertHelpHoverText(
|
||||||
@ -3845,7 +3838,7 @@ void DrawRandoEditor(bool& open) {
|
|||||||
"\n"
|
"\n"
|
||||||
"Anywhere - Spiritual stones and medallions can appear anywhere."
|
"Anywhere - Spiritual stones and medallions can appear anywhere."
|
||||||
);
|
);
|
||||||
UIWidgets::EnhancementCombobox("gRandomizeShuffleDungeonReward", randoShuffleDungeonRewards, RO_DUNGEON_REWARDS_MAX, RO_DUNGEON_REWARDS_END_OF_DUNGEON);
|
UIWidgets::EnhancementCombobox("gRandomizeShuffleDungeonReward", randoShuffleDungeonRewards, RO_DUNGEON_REWARDS_END_OF_DUNGEON);
|
||||||
|
|
||||||
UIWidgets::PaddedSeparator();
|
UIWidgets::PaddedSeparator();
|
||||||
|
|
||||||
@ -3864,7 +3857,7 @@ void DrawRandoEditor(bool& open) {
|
|||||||
"\n"
|
"\n"
|
||||||
"Anywhere - Maps & Compasses can appear anywhere in the world."
|
"Anywhere - Maps & Compasses can appear anywhere in the world."
|
||||||
);
|
);
|
||||||
UIWidgets::EnhancementCombobox("gRandomizeStartingMapsCompasses", randoShuffleMapsAndCompasses, RO_DUNGEON_ITEM_LOC_MAX, RO_DUNGEON_ITEM_LOC_OWN_DUNGEON);
|
UIWidgets::EnhancementCombobox("gRandomizeStartingMapsCompasses", randoShuffleMapsAndCompasses, RO_DUNGEON_ITEM_LOC_OWN_DUNGEON);
|
||||||
|
|
||||||
UIWidgets::PaddedSeparator();
|
UIWidgets::PaddedSeparator();
|
||||||
|
|
||||||
@ -3885,7 +3878,7 @@ void DrawRandoEditor(bool& open) {
|
|||||||
"\n"
|
"\n"
|
||||||
"Anywhere - Small Keys can appear anywhere in the world."
|
"Anywhere - Small Keys can appear anywhere in the world."
|
||||||
);
|
);
|
||||||
UIWidgets::EnhancementCombobox("gRandomizeKeysanity", randoShuffleSmallKeys, RO_DUNGEON_ITEM_LOC_MAX, RO_DUNGEON_ITEM_LOC_OWN_DUNGEON);
|
UIWidgets::EnhancementCombobox("gRandomizeKeysanity", randoShuffleSmallKeys, RO_DUNGEON_ITEM_LOC_OWN_DUNGEON);
|
||||||
|
|
||||||
UIWidgets::PaddedSeparator();
|
UIWidgets::PaddedSeparator();
|
||||||
|
|
||||||
@ -3902,13 +3895,12 @@ void DrawRandoEditor(bool& open) {
|
|||||||
"\n"
|
"\n"
|
||||||
"Selection - Hand select which dungeons will have their keys replaced with keyrings."
|
"Selection - Hand select which dungeons will have their keys replaced with keyrings."
|
||||||
);
|
);
|
||||||
UIWidgets::EnhancementCombobox("gRandomizeShuffleKeyRings", randoShuffleKeyRings, RO_KEYRINGS_MAX, RO_KEYRINGS_OFF);
|
UIWidgets::EnhancementCombobox("gRandomizeShuffleKeyRings", randoShuffleKeyRings, RO_KEYRINGS_OFF);
|
||||||
ImGui::PopItemWidth();
|
ImGui::PopItemWidth();
|
||||||
switch (CVarGetInteger("gRandomizeShuffleKeyRings", RO_KEYRINGS_OFF)) {
|
switch (CVarGetInteger("gRandomizeShuffleKeyRings", RO_KEYRINGS_OFF)) {
|
||||||
case RO_KEYRINGS_COUNT:
|
case RO_KEYRINGS_COUNT:
|
||||||
ImGui::Dummy(ImVec2(0.0f, 0.0f));
|
UIWidgets::PaddedEnhancementSliderInt("Key Ring Count: %d", "##RandomizeShuffleKeyRingsRandomCount",
|
||||||
UIWidgets::EnhancementSliderInt("Key Ring Count: %d", "##RandomizeShuffleKeyRingsRandomCount",
|
"gRandomizeShuffleKeyRingsRandomCount", 1, 8, "", 8, true, true, false);
|
||||||
"gRandomizeShuffleKeyRingsRandomCount", 1, 8, "", 8, true);
|
|
||||||
break;
|
break;
|
||||||
case RO_KEYRINGS_SELECTION:
|
case RO_KEYRINGS_SELECTION:
|
||||||
UIWidgets::EnhancementCheckbox("Forest Temple##RandomizeShuffleKeyRings", "gRandomizeShuffleKeyRingsForestTemple");
|
UIWidgets::EnhancementCheckbox("Forest Temple##RandomizeShuffleKeyRings", "gRandomizeShuffleKeyRingsForestTemple");
|
||||||
@ -3938,7 +3930,7 @@ void DrawRandoEditor(bool& open) {
|
|||||||
"\n"
|
"\n"
|
||||||
"Anywhere - Thieve's Hideout Keys can appear anywhere in the world."
|
"Anywhere - Thieve's Hideout Keys can appear anywhere in the world."
|
||||||
);
|
);
|
||||||
UIWidgets::EnhancementCombobox("gRandomizeGerudoKeys", randoShuffleGerudoFortressKeys, RO_GERUDO_KEYS_MAX, RO_GERUDO_KEYS_VANILLA);
|
UIWidgets::EnhancementCombobox("gRandomizeGerudoKeys", randoShuffleGerudoFortressKeys, RO_GERUDO_KEYS_VANILLA);
|
||||||
|
|
||||||
UIWidgets::PaddedSeparator();
|
UIWidgets::PaddedSeparator();
|
||||||
|
|
||||||
@ -3957,7 +3949,7 @@ void DrawRandoEditor(bool& open) {
|
|||||||
"\n"
|
"\n"
|
||||||
"Anywhere - Boss Keys can appear anywhere in the world."
|
"Anywhere - Boss Keys can appear anywhere in the world."
|
||||||
);
|
);
|
||||||
UIWidgets::EnhancementCombobox("gRandomizeBossKeysanity", randoShuffleBossKeys, RO_DUNGEON_ITEM_LOC_MAX, RO_DUNGEON_ITEM_LOC_OWN_DUNGEON);
|
UIWidgets::EnhancementCombobox("gRandomizeBossKeysanity", randoShuffleBossKeys, RO_DUNGEON_ITEM_LOC_OWN_DUNGEON);
|
||||||
|
|
||||||
UIWidgets::PaddedSeparator();
|
UIWidgets::PaddedSeparator();
|
||||||
|
|
||||||
@ -3986,33 +3978,28 @@ void DrawRandoEditor(bool& open) {
|
|||||||
"\n"
|
"\n"
|
||||||
"100 GS Reward - Ganon's Boss Key will be awarded by the cursed rich man after you collect 100 Gold Skulltula Tokens."
|
"100 GS Reward - Ganon's Boss Key will be awarded by the cursed rich man after you collect 100 Gold Skulltula Tokens."
|
||||||
);
|
);
|
||||||
UIWidgets::EnhancementCombobox("gRandomizeShuffleGanonBossKey", randoShuffleGanonsBossKey, RO_GANON_BOSS_KEY_MAX, RO_GANON_BOSS_KEY_VANILLA);
|
UIWidgets::EnhancementCombobox("gRandomizeShuffleGanonBossKey", randoShuffleGanonsBossKey, RO_GANON_BOSS_KEY_VANILLA);
|
||||||
ImGui::PopItemWidth();
|
ImGui::PopItemWidth();
|
||||||
switch (CVarGetInteger("gRandomizeShuffleGanonBossKey", RO_GANON_BOSS_KEY_VANILLA)) {
|
switch (CVarGetInteger("gRandomizeShuffleGanonBossKey", RO_GANON_BOSS_KEY_VANILLA)) {
|
||||||
case RO_GANON_BOSS_KEY_LACS_MEDALLIONS:
|
case RO_GANON_BOSS_KEY_LACS_MEDALLIONS:
|
||||||
ImGui::Dummy(ImVec2(0.0f, 0.0f));
|
UIWidgets::PaddedEnhancementSliderInt("Medallion Count: %d", "##RandoLacsMedallionCount",
|
||||||
UIWidgets::EnhancementSliderInt("Medallion Count: %d", "##RandoLacsMedallionCount",
|
"gRandomizeLacsMedallionCount", 1, 6, "", 6, true, true, false);
|
||||||
"gRandomizeLacsMedallionCount", 1, 6, "", 6, true);
|
|
||||||
break;
|
break;
|
||||||
case RO_GANON_BOSS_KEY_LACS_STONES:
|
case RO_GANON_BOSS_KEY_LACS_STONES:
|
||||||
ImGui::Dummy(ImVec2(0.0f, 0.0f));
|
UIWidgets::PaddedEnhancementSliderInt("Stone Count: %d", "##RandoLacsStoneCount",
|
||||||
UIWidgets::EnhancementSliderInt("Stone Count: %d", "##RandoLacsStoneCount",
|
"gRandomizeLacsStoneCount", 1, 3, "", 3, true, true, false);
|
||||||
"gRandomizeLacsStoneCount", 1, 3, "", 3, true);
|
|
||||||
break;
|
break;
|
||||||
case RO_GANON_BOSS_KEY_LACS_REWARDS:
|
case RO_GANON_BOSS_KEY_LACS_REWARDS:
|
||||||
ImGui::Dummy(ImVec2(0.0f, 0.0f));
|
UIWidgets::PaddedEnhancementSliderInt("Reward Count: %d", "##RandoLacsRewardCount",
|
||||||
UIWidgets::EnhancementSliderInt("Reward Count: %d", "##RandoLacsRewardCount",
|
"gRandomizeLacsRewardCount", 1, 9, "", 9, true, true, false);
|
||||||
"gRandomizeLacsRewardCount", 1, 9, "", 9, true);
|
|
||||||
break;
|
break;
|
||||||
case RO_GANON_BOSS_KEY_LACS_DUNGEONS:
|
case RO_GANON_BOSS_KEY_LACS_DUNGEONS:
|
||||||
ImGui::Dummy(ImVec2(0.0f, 0.0f));
|
UIWidgets::PaddedEnhancementSliderInt("Dungeon Count: %d", "##RandoLacsDungeonCount",
|
||||||
UIWidgets::EnhancementSliderInt("Dungeon Count: %d", "##RandoLacsDungeonCount",
|
"gRandomizeLacsDungeonCount", 1, 8, "", 8, true, true, false);
|
||||||
"gRandomizeLacsDungeonCount", 1, 8, "", 8, true);
|
|
||||||
break;
|
break;
|
||||||
case RO_GANON_BOSS_KEY_LACS_TOKENS:
|
case RO_GANON_BOSS_KEY_LACS_TOKENS:
|
||||||
ImGui::Dummy(ImVec2(0.0f, 0.0f));
|
UIWidgets::PaddedEnhancementSliderInt("Token Count: %d", "##RandoLacsTokenCount",
|
||||||
UIWidgets::EnhancementSliderInt("Token Count: %d", "##RandoLacsTokenCount",
|
"gRandomizeLacsTokenCount", 1, 100, "", 100, true, true, false);
|
||||||
"gRandomizeLacsTokenCount", 1, 100, "", 100, true);
|
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
@ -4046,17 +4033,19 @@ void DrawRandoEditor(bool& open) {
|
|||||||
ImGui::BeginChild("ChildTimeSavers", ImVec2(0, -8));
|
ImGui::BeginChild("ChildTimeSavers", ImVec2(0, -8));
|
||||||
|
|
||||||
// Cuccos to return
|
// Cuccos to return
|
||||||
UIWidgets::EnhancementSliderInt("Cuccos to return: %d", "##RandoCuccosToReturn",
|
int cuccos = CVarGetInteger("gRandomizeCuccosToReturn", 7);
|
||||||
"gRandomizeCuccosToReturn", 0, 7, "", 7, true);
|
ImGui::Text("Cuccos to return: %d", cuccos);
|
||||||
UIWidgets::InsertHelpHoverText("The amount of cuccos needed to claim the reward from Anju the cucco lady");
|
UIWidgets::InsertHelpHoverText("The amount of cuccos needed to claim the reward from Anju the cucco lady");
|
||||||
|
ImGui::SameLine();
|
||||||
|
UIWidgets::EnhancementSliderInt("", "##RandoCuccosToReturn", "gRandomizeCuccosToReturn", 0, 7, "", 7);
|
||||||
UIWidgets::PaddedSeparator();
|
UIWidgets::PaddedSeparator();
|
||||||
|
|
||||||
// Big Poe Target Count
|
// Big Poe Target Count
|
||||||
UIWidgets::EnhancementSliderInt("Big Poe Target Count: %d", "##RandoBigPoeTargetCount",
|
int poes = CVarGetInteger("gRandomizeBigPoeTargetCount", 10);
|
||||||
"gRandomizeBigPoeTargetCount", 1, 10, "", 10, true);
|
ImGui::Text("Big Poe Target Count: %d", poes);
|
||||||
UIWidgets::InsertHelpHoverText("The Poe collector will give a reward for turning in this many Big Poes.");
|
UIWidgets::InsertHelpHoverText("The Poe collector will give a reward for turning in this many Big Poes.");
|
||||||
|
ImGui::SameLine();
|
||||||
|
UIWidgets::EnhancementSliderInt("", "##RandoBigPoeTargetCount", "gRandomizeBigPoeTargetCount", 1, 10, "", 10);
|
||||||
UIWidgets::PaddedSeparator();
|
UIWidgets::PaddedSeparator();
|
||||||
|
|
||||||
// Skip child stealth
|
// Skip child stealth
|
||||||
@ -4124,7 +4113,7 @@ void DrawRandoEditor(bool& open) {
|
|||||||
"\n"
|
"\n"
|
||||||
"Minimal - Most excess items are removed."
|
"Minimal - Most excess items are removed."
|
||||||
);
|
);
|
||||||
UIWidgets::EnhancementCombobox("gRandomizeItemPool", randoItemPool, RO_ITEM_POOL_MAX, RO_ITEM_POOL_BALANCED);
|
UIWidgets::EnhancementCombobox("gRandomizeItemPool", randoItemPool, RO_ITEM_POOL_BALANCED);
|
||||||
UIWidgets::PaddedSeparator();
|
UIWidgets::PaddedSeparator();
|
||||||
|
|
||||||
// Ice Traps
|
// Ice Traps
|
||||||
@ -4143,7 +4132,7 @@ void DrawRandoEditor(bool& open) {
|
|||||||
"Onslaught - All junk items will be replaced by Ice Traps, even those "
|
"Onslaught - All junk items will be replaced by Ice Traps, even those "
|
||||||
"in the base pool."
|
"in the base pool."
|
||||||
);
|
);
|
||||||
UIWidgets::EnhancementCombobox("gRandomizeIceTraps", randoIceTraps, RO_ICE_TRAPS_MAX, RO_ICE_TRAPS_NORMAL);
|
UIWidgets::EnhancementCombobox("gRandomizeIceTraps", randoIceTraps, RO_ICE_TRAPS_NORMAL);
|
||||||
|
|
||||||
UIWidgets::PaddedSeparator();
|
UIWidgets::PaddedSeparator();
|
||||||
|
|
||||||
@ -4161,10 +4150,10 @@ void DrawRandoEditor(bool& open) {
|
|||||||
"Need Stone of Agony - Hints are only available after obtaining the Stone of Agony.\n"
|
"Need Stone of Agony - Hints are only available after obtaining the Stone of Agony.\n"
|
||||||
"\n"
|
"\n"
|
||||||
"Need Mask of Truth - Hints are only available whilst wearing the Mask of Truth.\n");
|
"Need Mask of Truth - Hints are only available whilst wearing the Mask of Truth.\n");
|
||||||
UIWidgets::EnhancementCombobox("gRandomizeGossipStoneHints", randoGossipStoneHints, RO_GOSSIP_STONES_MAX, RO_GOSSIP_STONES_NEED_NOTHING);
|
UIWidgets::EnhancementCombobox("gRandomizeGossipStoneHints", randoGossipStoneHints, RO_GOSSIP_STONES_NEED_NOTHING);
|
||||||
if (CVarGetInteger("gRandomizeGossipStoneHints", RO_GOSSIP_STONES_NEED_NOTHING) != RO_GOSSIP_STONES_NONE) {
|
if (CVarGetInteger("gRandomizeGossipStoneHints", RO_GOSSIP_STONES_NEED_NOTHING) != RO_GOSSIP_STONES_NONE) {
|
||||||
// Hint Clarity
|
// Hint Clarity
|
||||||
ImGui::Dummy(ImVec2(0.0f, 0.0f));
|
UIWidgets::Spacer(0);
|
||||||
ImGui::Indent();
|
ImGui::Indent();
|
||||||
ImGui::Text(Settings::ClearerHints.GetName().c_str());
|
ImGui::Text(Settings::ClearerHints.GetName().c_str());
|
||||||
UIWidgets::InsertHelpHoverText(
|
UIWidgets::InsertHelpHoverText(
|
||||||
@ -4179,10 +4168,10 @@ void DrawRandoEditor(bool& open) {
|
|||||||
"Clear - Hints are clearly written and are unique for each item.\n"
|
"Clear - Hints are clearly written and are unique for each item.\n"
|
||||||
"Ex: Kokiri Sword > the Kokiri Sword"
|
"Ex: Kokiri Sword > the Kokiri Sword"
|
||||||
);
|
);
|
||||||
UIWidgets::EnhancementCombobox("gRandomizeHintClarity", randoHintClarity, RO_HINT_CLARITY_MAX, RO_HINT_CLARITY_CLEAR);
|
UIWidgets::EnhancementCombobox("gRandomizeHintClarity", randoHintClarity, RO_HINT_CLARITY_CLEAR);
|
||||||
|
|
||||||
// Hint Distribution
|
// Hint Distribution
|
||||||
ImGui::Dummy(ImVec2(0.0f, 0.0f));
|
UIWidgets::Spacer(0);
|
||||||
ImGui::Text(Settings::HintDistribution.GetName().c_str());
|
ImGui::Text(Settings::HintDistribution.GetName().c_str());
|
||||||
UIWidgets::InsertHelpHoverText(
|
UIWidgets::InsertHelpHoverText(
|
||||||
"Sets how many hints will be useful.\n"
|
"Sets how many hints will be useful.\n"
|
||||||
@ -4195,7 +4184,7 @@ void DrawRandoEditor(bool& open) {
|
|||||||
"\n"
|
"\n"
|
||||||
"Very Strong - Many powerful hints."
|
"Very Strong - Many powerful hints."
|
||||||
);
|
);
|
||||||
UIWidgets::EnhancementCombobox("gRandomizeHintDistribution", randoHintDistribution, RO_HINT_DIST_MAX, RO_HINT_DIST_BALANCED);
|
UIWidgets::EnhancementCombobox("gRandomizeHintDistribution", randoHintDistribution, RO_HINT_DIST_BALANCED);
|
||||||
ImGui::Unindent();
|
ImGui::Unindent();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4325,9 +4314,9 @@ void DrawRandoEditor(bool& open) {
|
|||||||
locationSearch.Draw();
|
locationSearch.Draw();
|
||||||
|
|
||||||
ImGui::BeginChild("ChildIncludedLocations", ImVec2(0, -8));
|
ImGui::BeginChild("ChildIncludedLocations", ImVec2(0, -8));
|
||||||
for (auto [rcArea, rcObjects] : RandomizerCheckObjects::GetAllRCObjectsByArea()) {
|
for (auto& [rcArea, rcObjects] : RandomizerCheckObjects::GetAllRCObjectsByArea()) {
|
||||||
bool hasItems = false;
|
bool hasItems = false;
|
||||||
for (auto [randomizerCheck, rcObject] : rcObjects) {
|
for (auto& [randomizerCheck, rcObject] : rcObjects) {
|
||||||
if (rcObject->visibleInImgui && !excludedLocations.count(rcObject->rc) &&
|
if (rcObject->visibleInImgui && !excludedLocations.count(rcObject->rc) &&
|
||||||
locationSearch.PassFilter(rcObject->rcSpoilerName.c_str())) {
|
locationSearch.PassFilter(rcObject->rcSpoilerName.c_str())) {
|
||||||
|
|
||||||
@ -4339,7 +4328,7 @@ void DrawRandoEditor(bool& open) {
|
|||||||
if (hasItems) {
|
if (hasItems) {
|
||||||
ImGui::SetNextItemOpen(true, ImGuiCond_Once);
|
ImGui::SetNextItemOpen(true, ImGuiCond_Once);
|
||||||
if (ImGui::TreeNode(RandomizerCheckObjects::GetRCAreaName(rcArea).c_str())) {
|
if (ImGui::TreeNode(RandomizerCheckObjects::GetRCAreaName(rcArea).c_str())) {
|
||||||
for (auto [randomizerCheck, rcObject] : rcObjects) {
|
for (auto& [randomizerCheck, rcObject] : rcObjects) {
|
||||||
if (rcObject->visibleInImgui && !excludedLocations.count(rcObject->rc) &&
|
if (rcObject->visibleInImgui && !excludedLocations.count(rcObject->rc) &&
|
||||||
locationSearch.PassFilter(rcObject->rcSpoilerName.c_str())) {
|
locationSearch.PassFilter(rcObject->rcSpoilerName.c_str())) {
|
||||||
|
|
||||||
@ -4369,9 +4358,9 @@ void DrawRandoEditor(bool& open) {
|
|||||||
window->DC.CurrLineTextBaseOffset = 0.0f;
|
window->DC.CurrLineTextBaseOffset = 0.0f;
|
||||||
|
|
||||||
ImGui::BeginChild("ChildExcludedLocations", ImVec2(0, -8));
|
ImGui::BeginChild("ChildExcludedLocations", ImVec2(0, -8));
|
||||||
for (auto [rcArea, rcObjects] : RandomizerCheckObjects::GetAllRCObjectsByArea()) {
|
for (auto& [rcArea, rcObjects] : RandomizerCheckObjects::GetAllRCObjectsByArea()) {
|
||||||
bool hasItems = false;
|
bool hasItems = false;
|
||||||
for (auto [randomizerCheck, rcObject] : rcObjects) {
|
for (auto& [randomizerCheck, rcObject] : rcObjects) {
|
||||||
if (rcObject->visibleInImgui && excludedLocations.count(rcObject->rc)) {
|
if (rcObject->visibleInImgui && excludedLocations.count(rcObject->rc)) {
|
||||||
hasItems = true;
|
hasItems = true;
|
||||||
break;
|
break;
|
||||||
@ -4381,7 +4370,7 @@ void DrawRandoEditor(bool& open) {
|
|||||||
if (hasItems) {
|
if (hasItems) {
|
||||||
ImGui::SetNextItemOpen(true, ImGuiCond_Once);
|
ImGui::SetNextItemOpen(true, ImGuiCond_Once);
|
||||||
if (ImGui::TreeNode(RandomizerCheckObjects::GetRCAreaName(rcArea).c_str())) {
|
if (ImGui::TreeNode(RandomizerCheckObjects::GetRCAreaName(rcArea).c_str())) {
|
||||||
for (auto [randomizerCheck, rcObject] : rcObjects) {
|
for (auto& [randomizerCheck, rcObject] : rcObjects) {
|
||||||
auto elfound = excludedLocations.find(rcObject->rc);
|
auto elfound = excludedLocations.find(rcObject->rc);
|
||||||
if (rcObject->visibleInImgui && elfound != excludedLocations.end()) {
|
if (rcObject->visibleInImgui && elfound != excludedLocations.end()) {
|
||||||
if (ImGui::ArrowButton(std::to_string(rcObject->rc).c_str(), ImGuiDir_Left)) {
|
if (ImGui::ArrowButton(std::to_string(rcObject->rc).c_str(), ImGuiDir_Left)) {
|
||||||
@ -4426,7 +4415,7 @@ void DrawRandoEditor(bool& open) {
|
|||||||
"\n"
|
"\n"
|
||||||
"No logic - Item placement is completely random. MAY BE IMPOSSIBLE TO BEAT."
|
"No logic - Item placement is completely random. MAY BE IMPOSSIBLE TO BEAT."
|
||||||
);
|
);
|
||||||
UIWidgets::EnhancementCombobox("gRandomizeLogicRules", randoLogicRules, RO_LOGIC_MAX, RO_LOGIC_GLITCHLESS);
|
UIWidgets::EnhancementCombobox("gRandomizeLogicRules", randoLogicRules, RO_LOGIC_GLITCHLESS);
|
||||||
if (CVarGetInteger("gRandomizeLogicRules", RO_LOGIC_GLITCHLESS) == RO_LOGIC_GLITCHLESS) {
|
if (CVarGetInteger("gRandomizeLogicRules", RO_LOGIC_GLITCHLESS) == RO_LOGIC_GLITCHLESS) {
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
UIWidgets::EnhancementCheckbox(Settings::LocationsReachable.GetName().c_str(), "gRandomizeAllLocationsReachable", false, "", UIWidgets::CheckboxGraphics::Cross, RO_GENERIC_ON);
|
UIWidgets::EnhancementCheckbox(Settings::LocationsReachable.GetName().c_str(), "gRandomizeAllLocationsReachable", false, "", UIWidgets::CheckboxGraphics::Cross, RO_GENERIC_ON);
|
||||||
@ -4502,7 +4491,7 @@ void DrawRandoEditor(bool& open) {
|
|||||||
// TODO: Show this but disabled when we have options for disabled Comboboxes.
|
// TODO: Show this but disabled when we have options for disabled Comboboxes.
|
||||||
if (CVarGetInteger("gRandomizeShuffleDungeonReward", RO_DUNGEON_REWARDS_END_OF_DUNGEON) != RO_DUNGEON_REWARDS_END_OF_DUNGEON) {
|
if (CVarGetInteger("gRandomizeShuffleDungeonReward", RO_DUNGEON_REWARDS_END_OF_DUNGEON) != RO_DUNGEON_REWARDS_END_OF_DUNGEON) {
|
||||||
ImGui::Text(Settings::LinksPocketItem.GetName().c_str());
|
ImGui::Text(Settings::LinksPocketItem.GetName().c_str());
|
||||||
UIWidgets::EnhancementCombobox("gRandomizeLinksPocket", randoLinksPocket, RO_LINKS_POCKET_MAX, RO_LINKS_POCKET_DUNGEON_REWARD);
|
UIWidgets::EnhancementCombobox("gRandomizeLinksPocket", randoLinksPocket, RO_LINKS_POCKET_DUNGEON_REWARD);
|
||||||
UIWidgets::PaddedSeparator();
|
UIWidgets::PaddedSeparator();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4526,7 +4515,7 @@ void DrawRandoEditor(bool& open) {
|
|||||||
UIWidgets::EnhancementCheckbox(Settings::StartingConsumables.GetName().c_str(),
|
UIWidgets::EnhancementCheckbox(Settings::StartingConsumables.GetName().c_str(),
|
||||||
"gRandomizeStartingConsumables");
|
"gRandomizeStartingConsumables");
|
||||||
UIWidgets::PaddedSeparator();
|
UIWidgets::PaddedSeparator();
|
||||||
UIWidgets::EnhancementSliderInt("Gold Skulltula Tokens: %d", "##RandoStartingSkulltulaToken", "gRandomizeStartingSkulltulaToken", 0, 100, "", 0, true);
|
UIWidgets::EnhancementSliderInt("Gold Skulltula Tokens: %d", "##RandoStartingSkulltulaToken", "gRandomizeStartingSkulltulaToken", 0, 100, "", 0);
|
||||||
UIWidgets::PaddedSeparator();
|
UIWidgets::PaddedSeparator();
|
||||||
|
|
||||||
ImGui::EndChild();
|
ImGui::EndChild();
|
||||||
@ -4586,8 +4575,10 @@ void DrawRandoEditor(bool& open) {
|
|||||||
|
|
||||||
ImGui::EndTabBar();
|
ImGui::EndTabBar();
|
||||||
}
|
}
|
||||||
ImGui::PopItemFlag();
|
|
||||||
ImGui::PopStyleVar();
|
if (disableEditingRandoSettings) {
|
||||||
|
UIWidgets::ReEnableComponent("");
|
||||||
|
}
|
||||||
ImGui::End();
|
ImGui::End();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -4686,7 +4677,7 @@ CustomMessageEntry Randomizer::GetCursedSkullMessage(s16 params) {
|
|||||||
return messageEntry;
|
return messageEntry;
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* mapGetItemHints[3][2] = {
|
static const char* mapGetItemHints[3][2] = {
|
||||||
{ " It's ordinary.", " It's masterful!" },
|
{ " It's ordinary.", " It's masterful!" },
|
||||||
{ "&Sieht aus wie immer.", " &Man kann darauf die Worte&%r\"Master Quest\"%w entziffern..." },
|
{ "&Sieht aus wie immer.", " &Man kann darauf die Worte&%r\"Master Quest\"%w entziffern..." },
|
||||||
{ "&Elle vous semble %rordinaire%w.", "&Étrange... les mots %r\"Master&Quest\"%w sont gravés dessus." },
|
{ "&Elle vous semble %rordinaire%w.", "&Étrange... les mots %r\"Master&Quest\"%w sont gravés dessus." },
|
||||||
|
@ -1105,21 +1105,18 @@ typedef enum {
|
|||||||
typedef enum {
|
typedef enum {
|
||||||
RO_GENERIC_OFF,
|
RO_GENERIC_OFF,
|
||||||
RO_GENERIC_ON,
|
RO_GENERIC_ON,
|
||||||
RO_GENERIC_ON_OFF_MAX,
|
|
||||||
} RandoOptionGenericOffOn;
|
} RandoOptionGenericOffOn;
|
||||||
|
|
||||||
// no/yes
|
// no/yes
|
||||||
typedef enum {
|
typedef enum {
|
||||||
RO_GENERIC_NO,
|
RO_GENERIC_NO,
|
||||||
RO_GENERIC_YES,
|
RO_GENERIC_YES,
|
||||||
RO_GENERIC_NO_YES_MAX,
|
|
||||||
} RandoOptionGenericNoYes;
|
} RandoOptionGenericNoYes;
|
||||||
|
|
||||||
// don't skip/skip
|
// don't skip/skip
|
||||||
typedef enum {
|
typedef enum {
|
||||||
RO_GENERIC_DONT_SKIP,
|
RO_GENERIC_DONT_SKIP,
|
||||||
RO_GENERIC_SKIP,
|
RO_GENERIC_SKIP,
|
||||||
RO_GENERIC_SKIP_MAX,
|
|
||||||
} RandoOptionGenericSkip;
|
} RandoOptionGenericSkip;
|
||||||
|
|
||||||
//Forest settings (closed, closed deku, open)
|
//Forest settings (closed, closed deku, open)
|
||||||
@ -1127,7 +1124,6 @@ typedef enum {
|
|||||||
RO_FOREST_CLOSED,
|
RO_FOREST_CLOSED,
|
||||||
RO_FOREST_CLOSED_DEKU,
|
RO_FOREST_CLOSED_DEKU,
|
||||||
RO_FOREST_OPEN,
|
RO_FOREST_OPEN,
|
||||||
RO_FOREST_MAX,
|
|
||||||
} RandoOptionForest;
|
} RandoOptionForest;
|
||||||
|
|
||||||
//Door of Time settings (closed, song only, open)
|
//Door of Time settings (closed, song only, open)
|
||||||
@ -1135,7 +1131,6 @@ typedef enum {
|
|||||||
RO_DOOROFTIME_CLOSED,
|
RO_DOOROFTIME_CLOSED,
|
||||||
RO_DOOROFTIME_SONGONLY,
|
RO_DOOROFTIME_SONGONLY,
|
||||||
RO_DOOROFTIME_OPEN,
|
RO_DOOROFTIME_OPEN,
|
||||||
RO_DOOROFTIME_MAX,
|
|
||||||
} RandoOptionDoorOfTime;
|
} RandoOptionDoorOfTime;
|
||||||
|
|
||||||
//Zora's Fountain settings (closed, closed as child, open)
|
//Zora's Fountain settings (closed, closed as child, open)
|
||||||
@ -1143,7 +1138,6 @@ typedef enum {
|
|||||||
RO_ZF_CLOSED,
|
RO_ZF_CLOSED,
|
||||||
RO_ZF_CLOSED_CHILD,
|
RO_ZF_CLOSED_CHILD,
|
||||||
RO_ZF_OPEN,
|
RO_ZF_OPEN,
|
||||||
RO_ZF_MAX,
|
|
||||||
} RandoOptionZorasFountain;
|
} RandoOptionZorasFountain;
|
||||||
|
|
||||||
//Starting Age settings (child, adult, random)
|
//Starting Age settings (child, adult, random)
|
||||||
@ -1151,7 +1145,6 @@ typedef enum {
|
|||||||
RO_AGE_CHILD,
|
RO_AGE_CHILD,
|
||||||
RO_AGE_ADULT,
|
RO_AGE_ADULT,
|
||||||
RO_AGE_RANDOM,
|
RO_AGE_RANDOM,
|
||||||
RO_AGE_MAX,
|
|
||||||
} RandoOptionStartingAge;
|
} RandoOptionStartingAge;
|
||||||
|
|
||||||
//Gerudo Fortress settings (normal, fast, open)
|
//Gerudo Fortress settings (normal, fast, open)
|
||||||
@ -1159,14 +1152,12 @@ typedef enum {
|
|||||||
RO_GF_NORMAL,
|
RO_GF_NORMAL,
|
||||||
RO_GF_FAST,
|
RO_GF_FAST,
|
||||||
RO_GF_OPEN,
|
RO_GF_OPEN,
|
||||||
RO_GF_MAX,
|
|
||||||
} RandoOptionGerudoFortress;
|
} RandoOptionGerudoFortress;
|
||||||
|
|
||||||
//Kakariko Gate settings (closed/open)
|
//Kakariko Gate settings (closed/open)
|
||||||
typedef enum {
|
typedef enum {
|
||||||
RO_KAK_GATE_CLOSED,
|
RO_KAK_GATE_CLOSED,
|
||||||
RO_KAK_GATE_OPEN,
|
RO_KAK_GATE_OPEN,
|
||||||
RO_KAK_GATE_MAX,
|
|
||||||
} RandoOptionKakarikoGate;
|
} RandoOptionKakarikoGate;
|
||||||
|
|
||||||
//Rainbow Bridge settings (vanilla, always open, stones, medallions, dungeon rewards, dungeons, tokens)
|
//Rainbow Bridge settings (vanilla, always open, stones, medallions, dungeon rewards, dungeons, tokens)
|
||||||
@ -1179,7 +1170,6 @@ typedef enum {
|
|||||||
RO_BRIDGE_DUNGEONS,
|
RO_BRIDGE_DUNGEONS,
|
||||||
RO_BRIDGE_TOKENS,
|
RO_BRIDGE_TOKENS,
|
||||||
RO_BRIDGE_GREG,
|
RO_BRIDGE_GREG,
|
||||||
RO_BRIDGE_MAX,
|
|
||||||
} RandoOptionRainbowBridge;
|
} RandoOptionRainbowBridge;
|
||||||
|
|
||||||
//Shopsanity settings (off, 0-4 items, random)
|
//Shopsanity settings (off, 0-4 items, random)
|
||||||
@ -1191,7 +1181,6 @@ typedef enum {
|
|||||||
RO_SHOPSANITY_THREE_ITEMS,
|
RO_SHOPSANITY_THREE_ITEMS,
|
||||||
RO_SHOPSANITY_FOUR_ITEMS,
|
RO_SHOPSANITY_FOUR_ITEMS,
|
||||||
RO_SHOPSANITY_RANDOM,
|
RO_SHOPSANITY_RANDOM,
|
||||||
RO_SHOPSANITY_MAX,
|
|
||||||
} RandoOptionShopsanity;
|
} RandoOptionShopsanity;
|
||||||
|
|
||||||
//Shopsanity price ranges
|
//Shopsanity price ranges
|
||||||
@ -1201,7 +1190,6 @@ typedef enum {
|
|||||||
RO_SHOPSANITY_PRICE_ADULT,
|
RO_SHOPSANITY_PRICE_ADULT,
|
||||||
RO_SHOPSANITY_PRICE_GIANT,
|
RO_SHOPSANITY_PRICE_GIANT,
|
||||||
RO_SHOPSANITY_PRICE_TYCOON,
|
RO_SHOPSANITY_PRICE_TYCOON,
|
||||||
RO_SHOPSANITY_PRICE_MAX,
|
|
||||||
} RandoOptionShopsanityPrices;
|
} RandoOptionShopsanityPrices;
|
||||||
|
|
||||||
//Scrubsanity settings (off, affordable, expensive, random)
|
//Scrubsanity settings (off, affordable, expensive, random)
|
||||||
@ -1210,7 +1198,6 @@ typedef enum {
|
|||||||
RO_SCRUBS_AFFORDABLE,
|
RO_SCRUBS_AFFORDABLE,
|
||||||
RO_SCRUBS_EXPENSIVE,
|
RO_SCRUBS_EXPENSIVE,
|
||||||
RO_SCRUBS_RANDOM,
|
RO_SCRUBS_RANDOM,
|
||||||
RO_SCRUBS_MAX,
|
|
||||||
} RandoOptionScrubsanity;
|
} RandoOptionScrubsanity;
|
||||||
|
|
||||||
//Ammo drop settings (on, "on+bombchu", off)
|
//Ammo drop settings (on, "on+bombchu", off)
|
||||||
@ -1218,7 +1205,6 @@ typedef enum {
|
|||||||
RO_AMMO_DROPS_ON,
|
RO_AMMO_DROPS_ON,
|
||||||
RO_AMMO_DROPS_ON_PLUS_BOMBCHU,
|
RO_AMMO_DROPS_ON_PLUS_BOMBCHU,
|
||||||
RO_AMMO_DROPS_OFF,
|
RO_AMMO_DROPS_OFF,
|
||||||
RO_AMMO_DROPS_MAX,
|
|
||||||
} RandoOptionAmmoDrops;
|
} RandoOptionAmmoDrops;
|
||||||
|
|
||||||
//Any Dungeon Item (start with, vanilla, own dungeon, any dungeon,
|
//Any Dungeon Item (start with, vanilla, own dungeon, any dungeon,
|
||||||
@ -1230,7 +1216,6 @@ typedef enum {
|
|||||||
RO_DUNGEON_ITEM_LOC_ANY_DUNGEON,
|
RO_DUNGEON_ITEM_LOC_ANY_DUNGEON,
|
||||||
RO_DUNGEON_ITEM_LOC_OVERWORLD,
|
RO_DUNGEON_ITEM_LOC_OVERWORLD,
|
||||||
RO_DUNGEON_ITEM_LOC_ANYWHERE,
|
RO_DUNGEON_ITEM_LOC_ANYWHERE,
|
||||||
RO_DUNGEON_ITEM_LOC_MAX,
|
|
||||||
} RandoOptionDungeonItemLocation;
|
} RandoOptionDungeonItemLocation;
|
||||||
|
|
||||||
//Dungeon reward settings
|
//Dungeon reward settings
|
||||||
@ -1239,7 +1224,6 @@ typedef enum {
|
|||||||
RO_DUNGEON_REWARDS_ANY_DUNGEON,
|
RO_DUNGEON_REWARDS_ANY_DUNGEON,
|
||||||
RO_DUNGEON_REWARDS_OVERWORLD,
|
RO_DUNGEON_REWARDS_OVERWORLD,
|
||||||
RO_DUNGEON_REWARDS_ANYWHERE,
|
RO_DUNGEON_REWARDS_ANYWHERE,
|
||||||
RO_DUNGEON_REWARDS_MAX,
|
|
||||||
} RandoOptionDungeonRewards;
|
} RandoOptionDungeonRewards;
|
||||||
|
|
||||||
//Keyring Settings
|
//Keyring Settings
|
||||||
@ -1248,7 +1232,6 @@ typedef enum {
|
|||||||
RO_KEYRINGS_RANDOM,
|
RO_KEYRINGS_RANDOM,
|
||||||
RO_KEYRINGS_COUNT,
|
RO_KEYRINGS_COUNT,
|
||||||
RO_KEYRINGS_SELECTION,
|
RO_KEYRINGS_SELECTION,
|
||||||
RO_KEYRINGS_MAX,
|
|
||||||
} RandoOptionKeyrings;
|
} RandoOptionKeyrings;
|
||||||
|
|
||||||
//Ganon's Boss Key Settings (vanilla, own dungeon, start with,
|
//Ganon's Boss Key Settings (vanilla, own dungeon, start with,
|
||||||
@ -1267,7 +1250,6 @@ typedef enum {
|
|||||||
RO_GANON_BOSS_KEY_LACS_DUNGEONS,
|
RO_GANON_BOSS_KEY_LACS_DUNGEONS,
|
||||||
RO_GANON_BOSS_KEY_LACS_TOKENS,
|
RO_GANON_BOSS_KEY_LACS_TOKENS,
|
||||||
RO_GANON_BOSS_KEY_KAK_TOKENS,
|
RO_GANON_BOSS_KEY_KAK_TOKENS,
|
||||||
RO_GANON_BOSS_KEY_MAX,
|
|
||||||
} RandoOptionGanonsBossKey;
|
} RandoOptionGanonsBossKey;
|
||||||
|
|
||||||
//Ganon's Trials
|
//Ganon's Trials
|
||||||
@ -1275,7 +1257,6 @@ typedef enum {
|
|||||||
RO_GANONS_TRIALS_SKIP,
|
RO_GANONS_TRIALS_SKIP,
|
||||||
RO_GANONS_TRIALS_SET_NUMBER,
|
RO_GANONS_TRIALS_SET_NUMBER,
|
||||||
RO_GANONS_TRIALS_RANDOM_NUMBER,
|
RO_GANONS_TRIALS_RANDOM_NUMBER,
|
||||||
RO_GANONS_TRIALS_MAX,
|
|
||||||
} RandoOptionGanonsTrials;
|
} RandoOptionGanonsTrials;
|
||||||
|
|
||||||
//Shuffle Dungeon Entrance Settings (Off, on, plus ganon)
|
//Shuffle Dungeon Entrance Settings (Off, on, plus ganon)
|
||||||
@ -1283,7 +1264,6 @@ typedef enum {
|
|||||||
RO_DUNGEON_ENTRANCE_SHUFFLE_OFF,
|
RO_DUNGEON_ENTRANCE_SHUFFLE_OFF,
|
||||||
RO_DUNGEON_ENTRANCE_SHUFFLE_ON,
|
RO_DUNGEON_ENTRANCE_SHUFFLE_ON,
|
||||||
RO_DUNGEON_ENTRANCE_SHUFFLE_ON_PLUS_GANON,
|
RO_DUNGEON_ENTRANCE_SHUFFLE_ON_PLUS_GANON,
|
||||||
RO_DUNGEON_ENTRANCE_SHUFFLE_MAX,
|
|
||||||
} RandoOptionDungeonEntranceShuffle;
|
} RandoOptionDungeonEntranceShuffle;
|
||||||
|
|
||||||
//Shuffle Boss Room Entrance Settings (Off, Age Restricted, Full)
|
//Shuffle Boss Room Entrance Settings (Off, Age Restricted, Full)
|
||||||
@ -1291,7 +1271,6 @@ typedef enum {
|
|||||||
RO_BOSS_ROOM_ENTRANCE_SHUFFLE_OFF,
|
RO_BOSS_ROOM_ENTRANCE_SHUFFLE_OFF,
|
||||||
RO_BOSS_ROOM_ENTRANCE_SHUFFLE_AGE_RESTRICTED,
|
RO_BOSS_ROOM_ENTRANCE_SHUFFLE_AGE_RESTRICTED,
|
||||||
RO_BOSS_ROOM_ENTRANCE_SHUFFLE_FULL,
|
RO_BOSS_ROOM_ENTRANCE_SHUFFLE_FULL,
|
||||||
RO_BOSS_ROOM_ENTRANCE_SHUFFLE_MAX,
|
|
||||||
} RandoOptionBossRoomEntranceShuffle;
|
} RandoOptionBossRoomEntranceShuffle;
|
||||||
|
|
||||||
//Shuffle Interior Entrance Settings (Off, simple, all)
|
//Shuffle Interior Entrance Settings (Off, simple, all)
|
||||||
@ -1299,7 +1278,6 @@ typedef enum {
|
|||||||
RO_INTERIOR_ENTRANCE_SHUFFLE_OFF,
|
RO_INTERIOR_ENTRANCE_SHUFFLE_OFF,
|
||||||
RO_INTERIOR_ENTRANCE_SHUFFLE_SIMPLE,
|
RO_INTERIOR_ENTRANCE_SHUFFLE_SIMPLE,
|
||||||
RO_INTERIOR_ENTRANCE_SHUFFLE_ALL,
|
RO_INTERIOR_ENTRANCE_SHUFFLE_ALL,
|
||||||
RO_INTERIOR_ENTRANCE_SHUFFLE_MAX,
|
|
||||||
} RandoOptionInteriorEntranceShuffle;
|
} RandoOptionInteriorEntranceShuffle;
|
||||||
|
|
||||||
//Song shuffle Settings (Song locations, Dungeon rewards, anywhere)
|
//Song shuffle Settings (Song locations, Dungeon rewards, anywhere)
|
||||||
@ -1307,7 +1285,6 @@ typedef enum {
|
|||||||
RO_SONG_SHUFFLE_SONG_LOCATIONS,
|
RO_SONG_SHUFFLE_SONG_LOCATIONS,
|
||||||
RO_SONG_SHUFFLE_DUNGEON_REWARDS,
|
RO_SONG_SHUFFLE_DUNGEON_REWARDS,
|
||||||
RO_SONG_SHUFFLE_ANYWHERE,
|
RO_SONG_SHUFFLE_ANYWHERE,
|
||||||
RO_SONG_SHUFFLE_MAX,
|
|
||||||
} RandoOptionSongShuffle;
|
} RandoOptionSongShuffle;
|
||||||
|
|
||||||
//Shuffle Merchants Settings (Off, On no hint, on with wint)
|
//Shuffle Merchants Settings (Off, On no hint, on with wint)
|
||||||
@ -1315,14 +1292,12 @@ typedef enum {
|
|||||||
RO_SHUFFLE_MERCHANTS_OFF,
|
RO_SHUFFLE_MERCHANTS_OFF,
|
||||||
RO_SHUFFLE_MERCHANTS_ON_NO_HINT,
|
RO_SHUFFLE_MERCHANTS_ON_NO_HINT,
|
||||||
RO_SHUFFLE_MERCHANTS_ON_HINT,
|
RO_SHUFFLE_MERCHANTS_ON_HINT,
|
||||||
RO_SHUFFLE_MERCHANTS_MAX,
|
|
||||||
} RandoOptionShuffleMerchants;
|
} RandoOptionShuffleMerchants;
|
||||||
|
|
||||||
//Starting Ocarina Settings (off, fairy)
|
//Starting Ocarina Settings (off, fairy)
|
||||||
typedef enum {
|
typedef enum {
|
||||||
RO_STARTING_OCARINA_OFF,
|
RO_STARTING_OCARINA_OFF,
|
||||||
RO_STARTING_OCARINA_FAIRY,
|
RO_STARTING_OCARINA_FAIRY,
|
||||||
RO_STARTING_OCARINA_MAX,
|
|
||||||
} RandoOptionStartingOcarina;
|
} RandoOptionStartingOcarina;
|
||||||
|
|
||||||
//Item Pool Settings
|
//Item Pool Settings
|
||||||
@ -1331,7 +1306,6 @@ typedef enum {
|
|||||||
RO_ITEM_POOL_BALANCED,
|
RO_ITEM_POOL_BALANCED,
|
||||||
RO_ITEM_POOL_SCARCE,
|
RO_ITEM_POOL_SCARCE,
|
||||||
RO_ITEM_POOL_MINIMAL,
|
RO_ITEM_POOL_MINIMAL,
|
||||||
RO_ITEM_POOL_MAX,
|
|
||||||
} RandoOptionItemPool;
|
} RandoOptionItemPool;
|
||||||
|
|
||||||
//Ice Trap Settings
|
//Ice Trap Settings
|
||||||
@ -1341,7 +1315,6 @@ typedef enum {
|
|||||||
RO_ICE_TRAPS_EXTRA,
|
RO_ICE_TRAPS_EXTRA,
|
||||||
RO_ICE_TRAPS_MAYHEM,
|
RO_ICE_TRAPS_MAYHEM,
|
||||||
RO_ICE_TRAPS_ONSLAUGHT,
|
RO_ICE_TRAPS_ONSLAUGHT,
|
||||||
RO_ICE_TRAPS_MAX,
|
|
||||||
} RandoOptionIceTraps;
|
} RandoOptionIceTraps;
|
||||||
|
|
||||||
//Gossip Stone Hint Settings (no hints, needs nothing,
|
//Gossip Stone Hint Settings (no hints, needs nothing,
|
||||||
@ -1351,7 +1324,6 @@ typedef enum {
|
|||||||
RO_GOSSIP_STONES_NEED_NOTHING,
|
RO_GOSSIP_STONES_NEED_NOTHING,
|
||||||
RO_GOSSIP_STONES_NEED_TRUTH,
|
RO_GOSSIP_STONES_NEED_TRUTH,
|
||||||
RO_GOSSIP_STONES_NEED_STONE,
|
RO_GOSSIP_STONES_NEED_STONE,
|
||||||
RO_GOSSIP_STONES_MAX,
|
|
||||||
} RandoOptionGossipStones;
|
} RandoOptionGossipStones;
|
||||||
|
|
||||||
//Hint Clarity Settings (obscure, ambiguous, clear)
|
//Hint Clarity Settings (obscure, ambiguous, clear)
|
||||||
@ -1359,7 +1331,6 @@ typedef enum {
|
|||||||
RO_HINT_CLARITY_OBSCURE,
|
RO_HINT_CLARITY_OBSCURE,
|
||||||
RO_HINT_CLARITY_AMBIGUOUS,
|
RO_HINT_CLARITY_AMBIGUOUS,
|
||||||
RO_HINT_CLARITY_CLEAR,
|
RO_HINT_CLARITY_CLEAR,
|
||||||
RO_HINT_CLARITY_MAX,
|
|
||||||
} RandoOptionHintClarity;
|
} RandoOptionHintClarity;
|
||||||
|
|
||||||
//Hint Distribution Settings (useless, balanced, strong, very strong)
|
//Hint Distribution Settings (useless, balanced, strong, very strong)
|
||||||
@ -1368,7 +1339,6 @@ typedef enum {
|
|||||||
RO_HINT_DIST_BALANCED,
|
RO_HINT_DIST_BALANCED,
|
||||||
RO_HINT_DIST_STRONG,
|
RO_HINT_DIST_STRONG,
|
||||||
RO_HINT_DIST_VERY_STRONG,
|
RO_HINT_DIST_VERY_STRONG,
|
||||||
RO_HINT_DIST_MAX,
|
|
||||||
} RandoOptionHintDistribution;
|
} RandoOptionHintDistribution;
|
||||||
|
|
||||||
//Gerudo Fortress Key Settings (vanilla, any dungeon, overworld,
|
//Gerudo Fortress Key Settings (vanilla, any dungeon, overworld,
|
||||||
@ -1378,7 +1348,6 @@ typedef enum {
|
|||||||
RO_GERUDO_KEYS_ANY_DUNGEON,
|
RO_GERUDO_KEYS_ANY_DUNGEON,
|
||||||
RO_GERUDO_KEYS_OVERWORLD,
|
RO_GERUDO_KEYS_OVERWORLD,
|
||||||
RO_GERUDO_KEYS_ANYWHERE,
|
RO_GERUDO_KEYS_ANYWHERE,
|
||||||
RO_GERUDO_KEYS_MAX,
|
|
||||||
} RandoOptionGerudoKeys;
|
} RandoOptionGerudoKeys;
|
||||||
|
|
||||||
//Tokensanity settings (off, dungeons, overworld, all)
|
//Tokensanity settings (off, dungeons, overworld, all)
|
||||||
@ -1387,7 +1356,6 @@ typedef enum {
|
|||||||
RO_TOKENSANITY_DUNGEONS,
|
RO_TOKENSANITY_DUNGEONS,
|
||||||
RO_TOKENSANITY_OVERWORLD,
|
RO_TOKENSANITY_OVERWORLD,
|
||||||
RO_TOKENSANITY_ALL,
|
RO_TOKENSANITY_ALL,
|
||||||
RO_TOKENSANITY_MAX,
|
|
||||||
} RandoOptionTokensanity;
|
} RandoOptionTokensanity;
|
||||||
|
|
||||||
//Link's Pocket Settings (dungeon reward, advancement, anything, nothing)
|
//Link's Pocket Settings (dungeon reward, advancement, anything, nothing)
|
||||||
@ -1396,14 +1364,12 @@ typedef enum {
|
|||||||
RO_LINKS_POCKET_ADVANCEMENT,
|
RO_LINKS_POCKET_ADVANCEMENT,
|
||||||
RO_LINKS_POCKET_ANYTHING,
|
RO_LINKS_POCKET_ANYTHING,
|
||||||
RO_LINKS_POCKET_NOTHING,
|
RO_LINKS_POCKET_NOTHING,
|
||||||
RO_LINKS_POCKET_MAX,
|
|
||||||
} RandoOptionLinksPocket;
|
} RandoOptionLinksPocket;
|
||||||
|
|
||||||
// Logic (glitchless/no logic)
|
// Logic (glitchless/no logic)
|
||||||
typedef enum {
|
typedef enum {
|
||||||
RO_LOGIC_GLITCHLESS,
|
RO_LOGIC_GLITCHLESS,
|
||||||
RO_LOGIC_NO_LOGIC,
|
RO_LOGIC_NO_LOGIC,
|
||||||
RO_LOGIC_MAX,
|
|
||||||
} RandoOptionLogic;
|
} RandoOptionLogic;
|
||||||
|
|
||||||
// MQ Dungeons
|
// MQ Dungeons
|
||||||
@ -1411,7 +1377,6 @@ typedef enum {
|
|||||||
RO_MQ_DUNGEONS_NONE,
|
RO_MQ_DUNGEONS_NONE,
|
||||||
RO_MQ_DUNGEONS_SET_NUMBER,
|
RO_MQ_DUNGEONS_SET_NUMBER,
|
||||||
RO_MQ_DUNGEONS_RANDOM_NUMBER,
|
RO_MQ_DUNGEONS_RANDOM_NUMBER,
|
||||||
RO_MQ_DUNGEONS_MAX,
|
|
||||||
} RandoOptionMQDungeons;
|
} RandoOptionMQDungeons;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
|
@ -891,7 +891,7 @@ static std::set<std::string> rainbowCVars = {
|
|||||||
int hue = 0;
|
int hue = 0;
|
||||||
void RainbowTick() {
|
void RainbowTick() {
|
||||||
float freqHue = hue * 2 * M_PI / (360 * CVarGetFloat("gCosmetics.RainbowSpeed", 0.6f));
|
float freqHue = hue * 2 * M_PI / (360 * CVarGetFloat("gCosmetics.RainbowSpeed", 0.6f));
|
||||||
for (auto cvar : rainbowCVars) {
|
for (auto& cvar : rainbowCVars) {
|
||||||
if (CVarGetInteger((cvar + "RBM").c_str(), 0) == 0)
|
if (CVarGetInteger((cvar + "RBM").c_str(), 0) == 0)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
@ -956,10 +956,10 @@ void ImGuiDrawTwoColorPickerSection(const char* text, const char* cvarMainName,
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
const char* windowType[] = { "Floating", "Window" };
|
static const char* windowType[] = { "Floating", "Window" };
|
||||||
const char* displayType[] = { "Always", "Combo Button Hold" };
|
static const char* displayType[] = { "Always", "Combo Button Hold" };
|
||||||
const char* buttonStrings[] = { "A Button", "B Button", "C-Up", "C-Down", "C-Left", "C-Right", "L Button",
|
static const char* buttonStrings[] = { "A Button", "B Button", "C-Up", "C-Down", "C-Left", "C-Right", "L Button",
|
||||||
"Z Button", "R Button", "Start", "D-Up", "D-Down", "D-Left", "D-Right" };
|
"Z Button", "R Button", "Start", "D-Up", "D-Down", "D-Left", "D-Right" };
|
||||||
void DrawCheckTrackerOptions(bool& open) {
|
void DrawCheckTrackerOptions(bool& open) {
|
||||||
if (!open) {
|
if (!open) {
|
||||||
CVarSetInteger("gCheckTrackerSettingsEnabled", 0);
|
CVarSetInteger("gCheckTrackerSettingsEnabled", 0);
|
||||||
@ -990,23 +990,14 @@ void DrawCheckTrackerOptions(bool& open) {
|
|||||||
}
|
}
|
||||||
ImGui::PopItemWidth();
|
ImGui::PopItemWidth();
|
||||||
|
|
||||||
ImGui::Text("Window Type");
|
UIWidgets::LabeledRightAlignedEnhancementCombobox("Window Type", "gCheckTrackerWindowType", windowType, 1);
|
||||||
ImGui::SameLine();
|
|
||||||
UIWidgets::EnhancementCombobox("gCheckTrackerWindowType", windowType, 2, 1);
|
|
||||||
|
|
||||||
if (CVarGetInteger("gCheckTrackerWindowType", 1) == 0) {
|
if (CVarGetInteger("gCheckTrackerWindowType", 1) == 0) {
|
||||||
UIWidgets::EnhancementCheckbox("Enable Dragging", "gCheckTrackerHudEditMode");
|
UIWidgets::EnhancementCheckbox("Enable Dragging", "gCheckTrackerHudEditMode");
|
||||||
UIWidgets::EnhancementCheckbox("Only enable while paused", "gCheckTrackerShowOnlyPaused");
|
UIWidgets::EnhancementCheckbox("Only enable while paused", "gCheckTrackerShowOnlyPaused");
|
||||||
ImGui::Text("Display Mode");
|
UIWidgets::LabeledRightAlignedEnhancementCombobox("Display Mode", "gCheckTrackerDisplayType", displayType, 0);
|
||||||
ImGui::SameLine();
|
|
||||||
UIWidgets::EnhancementCombobox("gCheckTrackerDisplayType", displayType, 2, 0);
|
|
||||||
if (CVarGetInteger("gCheckTrackerDisplayType", 0) > 0) {
|
if (CVarGetInteger("gCheckTrackerDisplayType", 0) > 0) {
|
||||||
ImGui::Text("Combo Button 1");
|
UIWidgets::LabeledRightAlignedEnhancementCombobox("Combo Button 1", "gCheckTrackerComboButton1", buttonStrings, 6);
|
||||||
ImGui::SameLine();
|
UIWidgets::LabeledRightAlignedEnhancementCombobox("Combo Button 2", "gCheckTrackerComboButton2", buttonStrings, 8);
|
||||||
UIWidgets::EnhancementCombobox("gCheckTrackerComboButton1", buttonStrings, 14, 6);
|
|
||||||
ImGui::Text("Combo Button 2");
|
|
||||||
ImGui::SameLine();
|
|
||||||
UIWidgets::EnhancementCombobox("gCheckTrackerComboButton2", buttonStrings, 14, 8);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
UIWidgets::EnhancementCheckbox("Performance mode", "gCheckTrackerOptionPerformanceMode");
|
UIWidgets::EnhancementCheckbox("Performance mode", "gCheckTrackerOptionPerformanceMode");
|
||||||
|
@ -758,47 +758,6 @@ std::vector<ItemTrackerItem> GetDungeonItemsVector(std::vector<ItemTrackerDungeo
|
|||||||
|
|
||||||
return dungeonItems;
|
return dungeonItems;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* TODO: These need to be moved to a common imgui file */
|
|
||||||
void LabeledComboBoxRightAligned(const char* label, const char* cvar, std::vector<std::string> options, s32 defaultValue) {
|
|
||||||
s32 currentValue = CVarGetInteger(cvar, defaultValue);
|
|
||||||
std::string hiddenLabel = "##" + std::string(cvar);
|
|
||||||
ImGui::Text(label);
|
|
||||||
#ifdef __WIIU__
|
|
||||||
ImGui::SameLine(ImGui::GetContentRegionAvail().x - (ImGui::CalcTextSize(options[currentValue].c_str()).x * 1.0f + 40.0f));
|
|
||||||
ImGui::PushItemWidth((ImGui::CalcTextSize(options[currentValue].c_str()).x * 1.0f) + 60.0f);
|
|
||||||
#else
|
|
||||||
ImGui::SameLine(ImGui::GetContentRegionAvail().x - (ImGui::CalcTextSize(options[currentValue].c_str()).x * 1.0f + 20.0f));
|
|
||||||
ImGui::PushItemWidth((ImGui::CalcTextSize(options[currentValue].c_str()).x * 1.0f) + 30.0f);
|
|
||||||
#endif
|
|
||||||
if (ImGui::BeginCombo(hiddenLabel.c_str(), options[currentValue].c_str())) {
|
|
||||||
for (int i = 0; i < options.size(); i++) {
|
|
||||||
if (ImGui::Selectable(options[i].c_str())) {
|
|
||||||
CVarSetInteger(cvar, i);
|
|
||||||
SohImGui::RequestCvarSaveOnNextTick();
|
|
||||||
shouldUpdateVectors = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ImGui::EndCombo();
|
|
||||||
}
|
|
||||||
ImGui::PopItemWidth();
|
|
||||||
}
|
|
||||||
|
|
||||||
void PaddedEnhancementCheckbox(const char* text, const char* cvarName, s32 defaultValue = 0, bool padTop = true, bool padBottom = true) {
|
|
||||||
if (padTop) {
|
|
||||||
ImGui::Dummy(ImVec2(0.0f, 0.0f));
|
|
||||||
}
|
|
||||||
bool val = (bool)CVarGetInteger(cvarName, defaultValue);
|
|
||||||
if (ImGui::Checkbox(text, &val)) {
|
|
||||||
CVarSetInteger(cvarName, val);
|
|
||||||
SohImGui::RequestCvarSaveOnNextTick();
|
|
||||||
shouldUpdateVectors = true;
|
|
||||||
}
|
|
||||||
if (padBottom) {
|
|
||||||
ImGui::Dummy(ImVec2(0.0f, 0.0f));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/* ****************************************************** */
|
/* ****************************************************** */
|
||||||
|
|
||||||
void UpdateVectors() {
|
void UpdateVectors() {
|
||||||
@ -990,8 +949,13 @@ void DrawItemTracker(bool& open) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* itemTrackerCapacityTrackOptions[5] = { "No Numbers", "Current Capacity", "Current Ammo", "Current Capacity / Max Capacity", "Current Ammo / Current Capacity" };
|
static const char* itemTrackerCapacityTrackOptions[5] = { "No Numbers", "Current Capacity", "Current Ammo", "Current Capacity / Max Capacity", "Current Ammo / Current Capacity" };
|
||||||
const char* itemTrackerKeyTrackOptions[3] = { "Collected / Max", "Current / Collected / Max", "Current / Max" };
|
static const char* itemTrackerKeyTrackOptions[3] = { "Collected / Max", "Current / Collected / Max", "Current / Max" };
|
||||||
|
static const char* windowTypes[2] = { "Floating", "Window" };
|
||||||
|
static const char* displayModes[2] = { "Always", "Combo Button Hold" };
|
||||||
|
static const char* buttons[14] = { "A", "B", "C-Up", "C-Down", "C-Left", "C-Right", "L", "Z", "R", "Start", "D-Up", "D-Down", "D-Left", "D-Right" };
|
||||||
|
static const char* displayTypes[3] = { "Hidden", "Main Window", "Seperate" };
|
||||||
|
static const char* extendedDisplayTypes[4] = { "Hidden", "Main Window", "Misc Window", "Seperate" };
|
||||||
|
|
||||||
void DrawItemTrackerOptions(bool& open) {
|
void DrawItemTrackerOptions(bool& open) {
|
||||||
if (!open) {
|
if (!open) {
|
||||||
@ -1025,53 +989,89 @@ void DrawItemTrackerOptions(bool& open) {
|
|||||||
}
|
}
|
||||||
ImGui::PopItemWidth();
|
ImGui::PopItemWidth();
|
||||||
|
|
||||||
LabeledComboBoxRightAligned("Window Type", "gItemTrackerWindowType", { "Floating", "Window" }, 0);
|
if (UIWidgets::LabeledRightAlignedEnhancementCombobox("Window Type", "gItemTrackerWindowType", windowTypes, 0)) {
|
||||||
|
shouldUpdateVectors = true;
|
||||||
|
}
|
||||||
|
|
||||||
if (CVarGetInteger("gItemTrackerWindowType", 0) == 0) {
|
if (CVarGetInteger("gItemTrackerWindowType", 0) == 0) {
|
||||||
PaddedEnhancementCheckbox("Enable Dragging", "gItemTrackerHudEditMode", 0);
|
if (UIWidgets::PaddedEnhancementCheckbox("Enable Dragging", "gItemTrackerHudEditMode")) {
|
||||||
PaddedEnhancementCheckbox("Only enable while paused", "gItemTrackerShowOnlyPaused", 0);
|
shouldUpdateVectors = true;
|
||||||
LabeledComboBoxRightAligned("Display Mode", "gItemTrackerDisplayType", { "Always", "Combo Button Hold" }, 0);
|
}
|
||||||
|
if (UIWidgets::PaddedEnhancementCheckbox("Only enable while paused", "gItemTrackerShowOnlyPaused")) {
|
||||||
|
shouldUpdateVectors = true;
|
||||||
|
}
|
||||||
|
if (UIWidgets::LabeledRightAlignedEnhancementCombobox("Display Mode", "gItemTrackerDisplayType", displayModes, 0)) {
|
||||||
|
shouldUpdateVectors = true;
|
||||||
|
}
|
||||||
if (CVarGetInteger("gItemTrackerDisplayType", 0) > 0) {
|
if (CVarGetInteger("gItemTrackerDisplayType", 0) > 0) {
|
||||||
LabeledComboBoxRightAligned("Combo Button 1", "gItemTrackerComboButton1", { "A", "B", "C-Up", "C-Down", "C-Left", "C-Right", "L", "Z", "R", "Start", "D-Up", "D-Down", "D-Left", "D-Right" }, 6);
|
if (UIWidgets::LabeledRightAlignedEnhancementCombobox("Combo Button 1", "gItemTrackerComboButton1", buttons, 6)) {
|
||||||
LabeledComboBoxRightAligned("Combo Button 2", "gItemTrackerComboButton2", { "A", "B", "C-Up", "C-Down", "C-Left", "C-Right", "L", "Z", "R", "Start", "D-Up", "D-Down", "D-Left", "D-Right" }, 8);
|
shouldUpdateVectors = true;
|
||||||
|
}
|
||||||
|
if (UIWidgets::LabeledRightAlignedEnhancementCombobox("Combo Button 2", "gItemTrackerComboButton2", buttons, 8)) {
|
||||||
|
shouldUpdateVectors = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
UIWidgets::PaddedSeparator();
|
UIWidgets::PaddedSeparator();
|
||||||
UIWidgets::EnhancementSliderInt("Icon size : %dpx", "##ITEMTRACKERICONSIZE", "gItemTrackerIconSize", 25, 128, "", 36, true);
|
UIWidgets::EnhancementSliderInt("Icon size : %dpx", "##ITEMTRACKERICONSIZE", "gItemTrackerIconSize", 25, 128, "", 36);
|
||||||
UIWidgets::EnhancementSliderInt("Icon margins : %dpx", "##ITEMTRACKERSPACING", "gItemTrackerIconSpacing", -5, 50, "", 12, true);
|
UIWidgets::EnhancementSliderInt("Icon margins : %dpx", "##ITEMTRACKERSPACING", "gItemTrackerIconSpacing", -5, 50, "", 12);
|
||||||
|
|
||||||
ImGui::Text("Ammo/Capacity Tracking");
|
ImGui::Text("Ammo/Capacity Tracking");
|
||||||
UIWidgets::EnhancementCombobox("gItemTrackerCapacityTrack", itemTrackerCapacityTrackOptions, 5, 1);
|
UIWidgets::EnhancementCombobox("gItemTrackerCapacityTrack", itemTrackerCapacityTrackOptions, 1);
|
||||||
UIWidgets::InsertHelpHoverText("Customize what the numbers under each item are tracking."
|
UIWidgets::InsertHelpHoverText("Customize what the numbers under each item are tracking."
|
||||||
"\n\nNote: items without capacity upgrades will track ammo even in capacity mode");
|
"\n\nNote: items without capacity upgrades will track ammo even in capacity mode");
|
||||||
if (CVarGetInteger("gItemTrackerCapacityTrack", 1) == ITEM_TRACKER_NUMBER_CURRENT_CAPACITY_ONLY || CVarGetInteger("gItemTrackerCapacityTrack", 1) == ITEM_TRACKER_NUMBER_CURRENT_AMMO_ONLY) {
|
if (CVarGetInteger("gItemTrackerCapacityTrack", 1) == ITEM_TRACKER_NUMBER_CURRENT_CAPACITY_ONLY || CVarGetInteger("gItemTrackerCapacityTrack", 1) == ITEM_TRACKER_NUMBER_CURRENT_AMMO_ONLY) {
|
||||||
PaddedEnhancementCheckbox("Align count to left side", "gItemTrackerCurrentOnLeft", 0);
|
if (UIWidgets::PaddedEnhancementCheckbox("Align count to left side", "gItemTrackerCurrentOnLeft")) {
|
||||||
|
shouldUpdateVectors = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
ImGui::Text("Key Count Tracking");
|
ImGui::Text("Key Count Tracking");
|
||||||
UIWidgets::EnhancementCombobox("gItemTrackerKeyTrack", itemTrackerKeyTrackOptions, 3, 0);
|
UIWidgets::EnhancementCombobox("gItemTrackerKeyTrack", itemTrackerKeyTrackOptions, 0);
|
||||||
UIWidgets::InsertHelpHoverText("Customize what numbers are shown for key tracking.");
|
UIWidgets::InsertHelpHoverText("Customize what numbers are shown for key tracking.");
|
||||||
|
|
||||||
ImGui::TableNextColumn();
|
ImGui::TableNextColumn();
|
||||||
|
|
||||||
LabeledComboBoxRightAligned("Inventory", "gItemTrackerInventoryItemsDisplayType", { "Hidden", "Main Window", "Seperate" }, 1);
|
if (UIWidgets::LabeledRightAlignedEnhancementCombobox("Inventory", "gItemTrackerInventoryItemsDisplayType", displayTypes, 1)) {
|
||||||
LabeledComboBoxRightAligned("Equipment", "gItemTrackerEquipmentItemsDisplayType", { "Hidden", "Main Window", "Seperate" }, 1);
|
shouldUpdateVectors = true;
|
||||||
LabeledComboBoxRightAligned("Misc", "gItemTrackerMiscItemsDisplayType", { "Hidden", "Main Window", "Seperate" }, 1);
|
}
|
||||||
LabeledComboBoxRightAligned("Dungeon Rewards", "gItemTrackerDungeonRewardsDisplayType", { "Hidden", "Main Window", "Seperate" }, 1);
|
if (UIWidgets::LabeledRightAlignedEnhancementCombobox("Equipment", "gItemTrackerEquipmentItemsDisplayType", displayTypes, 1)) {
|
||||||
if (CVarGetInteger("gItemTrackerDungeonRewardsDisplayType", 1) == 2) {
|
shouldUpdateVectors = true;
|
||||||
PaddedEnhancementCheckbox("Circle display", "gItemTrackerDungeonRewardsCircle", 1);
|
}
|
||||||
|
if (UIWidgets::LabeledRightAlignedEnhancementCombobox("Misc", "gItemTrackerMiscItemsDisplayType", displayTypes, 1)) {
|
||||||
|
shouldUpdateVectors = true;
|
||||||
|
}
|
||||||
|
if (UIWidgets::LabeledRightAlignedEnhancementCombobox("Dungeon Rewards", "gItemTrackerDungeonRewardsDisplayType", displayTypes, 1)) {
|
||||||
|
shouldUpdateVectors = true;
|
||||||
|
}
|
||||||
|
if (CVarGetInteger("gItemTrackerDungeonRewardsDisplayType", 1) == 2) {
|
||||||
|
if (UIWidgets::PaddedEnhancementCheckbox("Circle display", "gItemTrackerDungeonRewardsCircle", true, true, false, "", UIWidgets::CheckboxGraphics::Cross, true)) {
|
||||||
|
shouldUpdateVectors = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (UIWidgets::LabeledRightAlignedEnhancementCombobox("Songs", "gItemTrackerSongsDisplayType", displayTypes, 1)) {
|
||||||
|
shouldUpdateVectors = true;
|
||||||
|
}
|
||||||
|
if (UIWidgets::LabeledRightAlignedEnhancementCombobox("Dungeon Items", "gItemTrackerDungeonItemsDisplayType", displayTypes, 0)) {
|
||||||
|
shouldUpdateVectors = true;
|
||||||
}
|
}
|
||||||
LabeledComboBoxRightAligned("Songs", "gItemTrackerSongsDisplayType", { "Hidden", "Main Window", "Seperate" }, 1);
|
|
||||||
LabeledComboBoxRightAligned("Dungeon Items", "gItemTrackerDungeonItemsDisplayType", { "Hidden", "Main Window", "Seperate" }, 0);
|
|
||||||
if (CVarGetInteger("gItemTrackerDungeonItemsDisplayType", 0) != 0) {
|
if (CVarGetInteger("gItemTrackerDungeonItemsDisplayType", 0) != 0) {
|
||||||
if (CVarGetInteger("gItemTrackerDungeonItemsDisplayType", 0) == 2) {
|
if (CVarGetInteger("gItemTrackerDungeonItemsDisplayType", 0) == 2) {
|
||||||
PaddedEnhancementCheckbox("Horizontal display", "gItemTrackerDisplayDungeonItemsHorizontal", 1);
|
if (UIWidgets::PaddedEnhancementCheckbox("Horizontal display", "gItemTrackerDisplayDungeonItemsHorizontal", true, true, false, "", UIWidgets::CheckboxGraphics::Cross, true)) {
|
||||||
|
shouldUpdateVectors = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (UIWidgets::PaddedEnhancementCheckbox("Maps and compasses", "gItemTrackerDisplayDungeonItemsMaps", true, true, false, "", UIWidgets::CheckboxGraphics::Cross, true)) {
|
||||||
|
shouldUpdateVectors = true;
|
||||||
}
|
}
|
||||||
PaddedEnhancementCheckbox("Maps and compasses", "gItemTrackerDisplayDungeonItemsMaps", 1);
|
|
||||||
}
|
}
|
||||||
LabeledComboBoxRightAligned("Greg", "gItemTrackerGregDisplayType", { "Hidden", "Main Window", "Misc Window", "Seperate" }, 0);
|
if (UIWidgets::LabeledRightAlignedEnhancementCombobox("Greg", "gItemTrackerGregDisplayType", extendedDisplayTypes, 0)) {
|
||||||
|
shouldUpdateVectors = true;
|
||||||
|
}
|
||||||
|
|
||||||
if (CVarGetInteger("gItemTrackerDisplayType", 0) != 1) {
|
if (CVarGetInteger("gItemTrackerDisplayType", 0) != 1) {
|
||||||
LabeledComboBoxRightAligned("Personal notes", "gItemTrackerNotesDisplayType", { "Hidden", "Main Window", "Seperate" }, 0);
|
if (UIWidgets::LabeledRightAlignedEnhancementCombobox("Personal notes", "gItemTrackerNotesDisplayType", displayTypes, 0)) {
|
||||||
|
shouldUpdateVectors = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui::PopStyleVar(1);
|
ImGui::PopStyleVar(1);
|
||||||
|
@ -61,19 +61,24 @@ namespace GameMenuBar {
|
|||||||
|
|
||||||
// MARK: - Properties
|
// MARK: - Properties
|
||||||
|
|
||||||
const char* powers[9] = {
|
static const char* chestSizeAndTextureMatchesContentsOptions[4] = { "Disabled", "Both", "Texture Only", "Size Only" };
|
||||||
"Vanilla (1x)",
|
static const char* bunnyHoodOptions[3] = { "Disabled", "Faster Run & Longer Jump", "Faster Run" };
|
||||||
"Double (2x)",
|
static const char* allPowers[9] = {
|
||||||
"Quadruple (4x)",
|
"Vanilla (1x)",
|
||||||
"Octuple (8x)",
|
"Double (2x)",
|
||||||
"Hexadecuple (16x)",
|
"Quadruple (4x)",
|
||||||
"Duotrigintuple (32x)",
|
"Octuple (8x)",
|
||||||
"Quattuorsexagintuple (64x)",
|
"Foolish (16x)",
|
||||||
"Octoviginticentuple (128x)",
|
"Ridiculous (32x)",
|
||||||
"Hexaquinquagintiducentuple (256x)"
|
"Merciless (64x)",
|
||||||
};
|
"Pure Torture (128x)",
|
||||||
|
"OHKO (256x)" };
|
||||||
const char* bonkDamageValues[8] = {
|
static const char* subPowers[8] = { allPowers[0], allPowers[1], allPowers[2], allPowers[3], allPowers[4], allPowers[5], allPowers[6], allPowers[7] };
|
||||||
|
static const char* subSubPowers[7] = { allPowers[0], allPowers[1], allPowers[2], allPowers[3], allPowers[4], allPowers[5], allPowers[6] };
|
||||||
|
static const char* zFightingOptions[3] = { "Disabled", "Consistent Vanish", "No Vanish" };
|
||||||
|
static const char* autosaveLabels[6] = { "Off", "New Location + Major Item", "New Location + Any Item", "New Location", "Major Item", "Any Item" };
|
||||||
|
static const char* FastFileSelect[5] = { "File N.1", "File N.2", "File N.3", "Zelda Map Select (require OoT Debug Mode)", "File select" };
|
||||||
|
static const char* bonkDamageValues[8] = {
|
||||||
"No Damage",
|
"No Damage",
|
||||||
"0.25 Heart",
|
"0.25 Heart",
|
||||||
"0.5 Heart",
|
"0.5 Heart",
|
||||||
@ -94,23 +99,11 @@ namespace GameMenuBar {
|
|||||||
return buttonText;
|
return buttonText;
|
||||||
}
|
}
|
||||||
|
|
||||||
void BindAudioSlider(const char* name, const char* key, float defaultValue, SeqPlayers playerId) {
|
|
||||||
float value = CVarGetFloat(key, defaultValue);
|
|
||||||
|
|
||||||
ImGui::Text(name, static_cast<int>(100 * value));
|
|
||||||
if (ImGui::SliderFloat((std::string("##") + key).c_str(), &value, 0.0f, 1.0f, "")) {
|
|
||||||
const float volume = floorf(value * 100) / 100;
|
|
||||||
CVarSetFloat(key, volume);
|
|
||||||
SohImGui::RequestCvarSaveOnNextTick();
|
|
||||||
Audio_SetGameVolume(playerId, volume);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void UpdateAudio() {
|
void UpdateAudio() {
|
||||||
Audio_SetGameVolume(SEQ_BGM_MAIN, CVarGetFloat("gMainMusicVolume", 1));
|
Audio_SetGameVolume(SEQ_BGM_MAIN, CVarGetFloat("gMainMusicVolume", 1.0f));
|
||||||
Audio_SetGameVolume(SEQ_BGM_SUB, CVarGetFloat("gSubMusicVolume", 1));
|
Audio_SetGameVolume(SEQ_BGM_SUB, CVarGetFloat("gSubMusicVolume", 1.0f));
|
||||||
Audio_SetGameVolume(SEQ_FANFARE, CVarGetFloat("gSFXMusicVolume", 1));
|
Audio_SetGameVolume(SEQ_FANFARE, CVarGetFloat("gFanfareVolume", 1.0f));
|
||||||
Audio_SetGameVolume(SEQ_SFX, CVarGetFloat("gFanfareVolume", 1));
|
Audio_SetGameVolume(SEQ_SFX, CVarGetFloat("gSFXMusicVolume", 1.0f));
|
||||||
}
|
}
|
||||||
|
|
||||||
// MARK: - Delegates
|
// MARK: - Delegates
|
||||||
@ -124,23 +117,26 @@ namespace GameMenuBar {
|
|||||||
if (ImGui::BeginMenu("Settings"))
|
if (ImGui::BeginMenu("Settings"))
|
||||||
{
|
{
|
||||||
if (ImGui::BeginMenu("Audio")) {
|
if (ImGui::BeginMenu("Audio")) {
|
||||||
UIWidgets::EnhancementSliderFloat("Master Volume: %d %%", "##Master_Vol", "gGameMasterVolume", 0.0f, 1.0f, "", 1.0f, true);
|
UIWidgets::PaddedEnhancementSliderFloat("Master Volume: %d %%", "##Master_Vol", "gGameMasterVolume", 0.0f, 1.0f, "", 1.0f, true, true, false, true);
|
||||||
UIWidgets::Spacer(0);
|
if (UIWidgets::PaddedEnhancementSliderFloat("Main Music Volume: %d %%", "##Main_Music_Vol", "gMainMusicVolume", 0.0f, 1.0f, "", 1.0f, true, true, false, true)) {
|
||||||
BindAudioSlider("Main Music Volume: %d %%", "gMainMusicVolume", 1.0f, SEQ_BGM_MAIN);
|
Audio_SetGameVolume(SEQ_BGM_MAIN, CVarGetFloat("gMainMusicVolume", 1.0f));
|
||||||
UIWidgets::Spacer(0);
|
}
|
||||||
BindAudioSlider("Sub Music Volume: %d %%", "gSubMusicVolume", 1.0f, SEQ_BGM_SUB);
|
if (UIWidgets::PaddedEnhancementSliderFloat("Sub Music Volume: %d %%", "##Sub_Music_Vol", "gSubMusicVolume", 0.0f, 1.0f, "", 1.0f, true, true, false, true)) {
|
||||||
UIWidgets::Spacer(0);
|
Audio_SetGameVolume(SEQ_BGM_SUB, CVarGetFloat("gSubMusicVolume", 1.0f));
|
||||||
BindAudioSlider("Sound Effects Volume: %d %%", "gSFXMusicVolume", 1.0f, SEQ_SFX);
|
}
|
||||||
UIWidgets::Spacer(0);
|
if (UIWidgets::PaddedEnhancementSliderFloat("Sound Effects Volume: %d %%", "##Sound_Effect_Vol", "gSFXMusicVolume", 0.0f, 1.0f, "", 1.0f, true, true, false, true)) {
|
||||||
BindAudioSlider("Fanfare Volume: %d %%", "gFanfareVolume", 1.0f, SEQ_FANFARE);
|
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)) {
|
||||||
|
Audio_SetGameVolume(SEQ_FANFARE, CVarGetFloat("gFanfareVolume", 1.0f));
|
||||||
|
}
|
||||||
|
|
||||||
ImGui::Text("Audio API (Needs reload)");
|
ImGui::Text("Audio API (Needs reload)");
|
||||||
auto audioBackends = SohImGui::GetAvailableAudioBackends();
|
auto audioBackends = SohImGui::GetAvailableAudioBackends();
|
||||||
auto currentAudioBackend = SohImGui::GetCurrentAudioBackend();
|
auto currentAudioBackend = SohImGui::GetCurrentAudioBackend();
|
||||||
|
|
||||||
if (audioBackends.size() <= 1) {
|
if (audioBackends.size() <= 1) {
|
||||||
ImGui::PushItemFlag(ImGuiItemFlags_Disabled, true);
|
UIWidgets::DisableComponent(ImGui::GetStyle().Alpha * 0.5f);
|
||||||
ImGui::PushStyleVar(ImGuiStyleVar_Alpha, ImGui::GetStyle().Alpha * 0.5f);
|
|
||||||
}
|
}
|
||||||
if (ImGui::BeginCombo("##AApi", currentAudioBackend.second)) {
|
if (ImGui::BeginCombo("##AApi", currentAudioBackend.second)) {
|
||||||
for (uint8_t i = 0; i < audioBackends.size(); i++) {
|
for (uint8_t i = 0; i < audioBackends.size(); i++) {
|
||||||
@ -152,8 +148,7 @@ namespace GameMenuBar {
|
|||||||
ImGui::EndCombo();
|
ImGui::EndCombo();
|
||||||
}
|
}
|
||||||
if (audioBackends.size() <= 1) {
|
if (audioBackends.size() <= 1) {
|
||||||
ImGui::PopItemFlag();
|
UIWidgets::ReEnableComponent("");
|
||||||
ImGui::PopStyleVar(1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui::EndMenu();
|
ImGui::EndMenu();
|
||||||
@ -180,18 +175,12 @@ namespace GameMenuBar {
|
|||||||
UIWidgets::EnhancementCheckbox("Menubar Controller Navigation", "gControlNav");
|
UIWidgets::EnhancementCheckbox("Menubar Controller Navigation", "gControlNav");
|
||||||
UIWidgets::Tooltip("Allows controller navigation of the SOH menu bar (Settings, Enhancements,...)\nCAUTION: This will disable game inputs while the menubar is visible.\n\nD-pad to move between items, A to select, and X to grab focus on the menu bar");
|
UIWidgets::Tooltip("Allows controller navigation of the SOH menu bar (Settings, Enhancements,...)\nCAUTION: This will disable game inputs while the menubar is visible.\n\nD-pad to move between items, A to select, and X to grab focus on the menu bar");
|
||||||
#endif
|
#endif
|
||||||
UIWidgets::EnhancementCheckbox("Show Inputs", "gInputEnabled");
|
UIWidgets::PaddedEnhancementCheckbox("Show Inputs", "gInputEnabled", true, false);
|
||||||
UIWidgets::Tooltip("Shows currently pressed inputs on the bottom right of the screen");
|
UIWidgets::Tooltip("Shows currently pressed inputs on the bottom right of the screen");
|
||||||
UIWidgets::Spacer(0);
|
UIWidgets::PaddedEnhancementSliderFloat("Input Scale: %.1f", "##Input", "gInputScale", 1.0f, 3.0f, "", 1.0f, false, true, true, false);
|
||||||
ImGui::PushItemWidth(ImGui::GetWindowSize().x - 20.0f);
|
|
||||||
UIWidgets::EnhancementSliderFloat("Input Scale: %.1f", "##Input", "gInputScale", 1.0f, 3.0f, "", 1.0f, false);
|
|
||||||
UIWidgets::Tooltip("Sets the on screen size of the displayed inputs from the Show Inputs setting");
|
UIWidgets::Tooltip("Sets the on screen size of the displayed inputs from the Show Inputs setting");
|
||||||
ImGui::PopItemWidth();
|
UIWidgets::PaddedEnhancementSliderInt("Simulated Input Lag: %d frames", "##SimulatedInputLag", "gSimulatedInputLag", 0, 6, "", 0, true, true, false);
|
||||||
UIWidgets::Spacer(0);
|
|
||||||
ImGui::PushItemWidth(ImGui::GetWindowSize().x - 20.0f);
|
|
||||||
UIWidgets::EnhancementSliderInt("Simulated Input Lag: %d frames", "##SimulatedInputLag", "gSimulatedInputLag", 0, 6, "", 0, false);
|
|
||||||
UIWidgets::Tooltip("Buffers your inputs to be executed a specified amount of frames later");
|
UIWidgets::Tooltip("Buffers your inputs to be executed a specified amount of frames later");
|
||||||
ImGui::PopItemWidth();
|
|
||||||
|
|
||||||
ImGui::EndMenu();
|
ImGui::EndMenu();
|
||||||
}
|
}
|
||||||
@ -200,67 +189,20 @@ namespace GameMenuBar {
|
|||||||
|
|
||||||
if (ImGui::BeginMenu("Graphics")) {
|
if (ImGui::BeginMenu("Graphics")) {
|
||||||
#ifndef __APPLE__
|
#ifndef __APPLE__
|
||||||
UIWidgets::EnhancementSliderFloat("Internal Resolution: %d %%", "##IMul", "gInternalResolution", 0.5f, 2.0f, "", 1.0f, true, true);
|
UIWidgets::EnhancementSliderFloat("Internal Resolution: %d %%", "##IMul", "gInternalResolution", 0.5f, 2.0f, "", 1.0f, true);
|
||||||
UIWidgets::Tooltip("Multiplies your output resolution by the value inputted, as a more intensive but effective form of anti-aliasing");
|
UIWidgets::Tooltip("Multiplies your output resolution by the value inputted, as a more intensive but effective form of anti-aliasing");
|
||||||
SohImGui::SetResolutionMultiplier(CVarGetFloat("gInternalResolution", 1));
|
SohImGui::SetResolutionMultiplier(CVarGetFloat("gInternalResolution", 1));
|
||||||
#endif
|
#endif
|
||||||
#ifndef __WIIU__
|
#ifndef __WIIU__
|
||||||
UIWidgets::PaddedEnhancementSliderInt("MSAA: %d", "##IMSAA", "gMSAAValue", 1, 8, "", 1, false, true, false);
|
UIWidgets::PaddedEnhancementSliderInt("MSAA: %d", "##IMSAA", "gMSAAValue", 1, 8, "", 1, true, true, false);
|
||||||
UIWidgets::Tooltip("Activates multi-sample anti-aliasing when above 1x up to 8x for 8 samples for every pixel");
|
UIWidgets::Tooltip("Activates multi-sample anti-aliasing when above 1x up to 8x for 8 samples for every pixel");
|
||||||
SohImGui::SetMSAALevel(CVarGetInteger("gMSAAValue", 1));
|
SohImGui::SetMSAALevel(CVarGetInteger("gMSAAValue", 1));
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (SohImGui::WindowBackend() == SohImGui::Backend::DX11)
|
if (SohImGui::WindowBackend() == SohImGui::Backend::DX11) {
|
||||||
{
|
UIWidgets::PaddedEnhancementSliderInt(CVarGetInteger("gExtraLatencyThreshold", 80) == 0 ? "Jitter fix: Off" : "Jitter fix: >= %d FPS",
|
||||||
const char* cvar = "gExtraLatencyThreshold";
|
"##ExtraLatencyThreshold", "gExtraLatencyThreshold", 0, 360, "", 80, true, true, false);
|
||||||
int val = CVarGetInteger(cvar, 80);
|
|
||||||
val = fmax(fmin(val, 360), 0);
|
|
||||||
int fps = val;
|
|
||||||
|
|
||||||
UIWidgets::Spacer(0);
|
|
||||||
|
|
||||||
if (fps == 0)
|
|
||||||
{
|
|
||||||
ImGui::Text("Jitter fix: Off");
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
ImGui::Text("Jitter fix: >= %d FPS", fps);
|
|
||||||
}
|
|
||||||
|
|
||||||
std::string MinusBTNELT = " - ##ExtraLatencyThreshold";
|
|
||||||
std::string PlusBTNELT = " + ##ExtraLatencyThreshold";
|
|
||||||
if (ImGui::Button(MinusBTNELT.c_str())) {
|
|
||||||
val--;
|
|
||||||
CVarSetInteger(cvar, val);
|
|
||||||
SohImGui::RequestCvarSaveOnNextTick();
|
|
||||||
}
|
|
||||||
ImGui::SameLine();
|
|
||||||
ImGui::SetCursorPosX(ImGui::GetCursorPosX() - 7.0f);
|
|
||||||
#ifdef __SWITCH__
|
|
||||||
ImGui::PushItemWidth(ImGui::GetWindowSize().x - 110.0f);
|
|
||||||
#elif defined(__WIIU__)
|
|
||||||
ImGui::PushItemWidth(ImGui::GetWindowSize().x - 79.0f * 2);
|
|
||||||
#else
|
|
||||||
ImGui::PushItemWidth(ImGui::GetWindowSize().x - 79.0f);
|
|
||||||
#endif
|
|
||||||
if (ImGui::SliderInt("##ExtraLatencyThreshold", &val, 0, 360, "", ImGuiSliderFlags_AlwaysClamp))
|
|
||||||
{
|
|
||||||
CVarSetInteger(cvar, val);
|
|
||||||
SohImGui::RequestCvarSaveOnNextTick();
|
|
||||||
}
|
|
||||||
ImGui::PopItemWidth();
|
|
||||||
UIWidgets::Tooltip("When Interpolation FPS setting is at least this threshold, add one frame of input lag (e.g. 16.6 ms for 60 FPS) in order to avoid jitter. This setting allows the CPU to work on one frame while GPU works on the previous frame.\nThis setting should be used when your computer is too slow to do CPU + GPU work in time.");
|
UIWidgets::Tooltip("When Interpolation FPS setting is at least this threshold, add one frame of input lag (e.g. 16.6 ms for 60 FPS) in order to avoid jitter. This setting allows the CPU to work on one frame while GPU works on the previous frame.\nThis setting should be used when your computer is too slow to do CPU + GPU work in time.");
|
||||||
|
|
||||||
ImGui::SameLine();
|
|
||||||
ImGui::SetCursorPosX(ImGui::GetCursorPosX() - 7.0f);
|
|
||||||
if (ImGui::Button(PlusBTNELT.c_str())) {
|
|
||||||
val++;
|
|
||||||
CVarSetInteger(cvar, val);
|
|
||||||
SohImGui::RequestCvarSaveOnNextTick();
|
|
||||||
}
|
|
||||||
|
|
||||||
UIWidgets::Spacer(0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui::Text("Renderer API (Needs reload)");
|
ImGui::Text("Renderer API (Needs reload)");
|
||||||
@ -268,8 +210,7 @@ namespace GameMenuBar {
|
|||||||
auto currentRenderingBackend = SohImGui::GetCurrentRenderingBackend();
|
auto currentRenderingBackend = SohImGui::GetCurrentRenderingBackend();
|
||||||
|
|
||||||
if (renderingBackends.size() <= 1) {
|
if (renderingBackends.size() <= 1) {
|
||||||
ImGui::PushItemFlag(ImGuiItemFlags_Disabled, true);
|
UIWidgets::DisableComponent(ImGui::GetStyle().Alpha * 0.5f);
|
||||||
ImGui::PushStyleVar(ImGuiStyleVar_Alpha, ImGui::GetStyle().Alpha * 0.5f);
|
|
||||||
}
|
}
|
||||||
if (ImGui::BeginCombo("##RApi", currentRenderingBackend.second)) {
|
if (ImGui::BeginCombo("##RApi", currentRenderingBackend.second)) {
|
||||||
for (uint8_t i = 0; i < renderingBackends.size(); i++) {
|
for (uint8_t i = 0; i < renderingBackends.size(); i++) {
|
||||||
@ -281,8 +222,7 @@ namespace GameMenuBar {
|
|||||||
ImGui::EndCombo();
|
ImGui::EndCombo();
|
||||||
}
|
}
|
||||||
if (renderingBackends.size() <= 1) {
|
if (renderingBackends.size() <= 1) {
|
||||||
ImGui::PopItemFlag();
|
UIWidgets::ReEnableComponent("");
|
||||||
ImGui::PopStyleVar(1);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (SohImGui::SupportsWindowedFullscreen()) {
|
if (SohImGui::SupportsWindowedFullscreen()) {
|
||||||
@ -296,8 +236,12 @@ namespace GameMenuBar {
|
|||||||
|
|
||||||
EXPERIMENTAL();
|
EXPERIMENTAL();
|
||||||
|
|
||||||
|
// If more filters are added to LUS, make sure to add them to the filters list here
|
||||||
ImGui::Text("Texture Filter (Needs reload)");
|
ImGui::Text("Texture Filter (Needs reload)");
|
||||||
UIWidgets::EnhancementCombobox("gTextureFilter", SohImGui::GetSupportedTextureFilters(), 3, 0);
|
const char* filters[] = { SohImGui::GetSupportedTextureFilters()[0],
|
||||||
|
SohImGui::GetSupportedTextureFilters()[1],
|
||||||
|
SohImGui::GetSupportedTextureFilters()[2] };
|
||||||
|
UIWidgets::EnhancementCombobox("gTextureFilter", filters, 0);
|
||||||
|
|
||||||
UIWidgets::Spacer(0);
|
UIWidgets::Spacer(0);
|
||||||
|
|
||||||
@ -349,15 +293,15 @@ namespace GameMenuBar {
|
|||||||
{
|
{
|
||||||
if (ImGui::BeginMenu("Time Savers"))
|
if (ImGui::BeginMenu("Time Savers"))
|
||||||
{
|
{
|
||||||
UIWidgets::PaddedEnhancementSliderInt("Text Speed: %dx", "##TEXTSPEED", "gTextSpeed", 1, 5, "", 1, false, false, true);
|
UIWidgets::PaddedEnhancementSliderInt("Text Speed: %dx", "##TEXTSPEED", "gTextSpeed", 1, 5, "", 1, true, false, true);
|
||||||
UIWidgets::PaddedEnhancementSliderInt("King Zora Speed: %dx", "##MWEEPSPEED", "gMweepSpeed", 1, 5, "", 1, false, false, true);
|
UIWidgets::PaddedEnhancementSliderInt("King Zora Speed: %dx", "##MWEEPSPEED", "gMweepSpeed", 1, 5, "", 1, true, false, true);
|
||||||
UIWidgets::EnhancementSliderInt("Biggoron Forge Time: %d days", "##FORGETIME", "gForgeTime", 0, 3, "", 3);
|
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::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, false, false, true);
|
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, false, 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", true, false);
|
||||||
UIWidgets::Tooltip("Speeds up lifting silver rocks and obelisks");
|
UIWidgets::Tooltip("Speeds up lifting silver rocks and obelisks");
|
||||||
UIWidgets::PaddedEnhancementCheckbox("Link as default file name", "gLinkDefaultName");
|
UIWidgets::PaddedEnhancementCheckbox("Link as default file name", "gLinkDefaultName", true, false);
|
||||||
UIWidgets::Tooltip("Allows you to have \"Link\" as a premade file name");
|
UIWidgets::Tooltip("Allows you to have \"Link\" as a premade file name");
|
||||||
UIWidgets::PaddedEnhancementCheckbox("No Forced Navi", "gNoForcedNavi", true, false);
|
UIWidgets::PaddedEnhancementCheckbox("No Forced Navi", "gNoForcedNavi", true, false);
|
||||||
UIWidgets::Tooltip("Prevent forced Navi conversations");
|
UIWidgets::Tooltip("Prevent forced Navi conversations");
|
||||||
@ -366,7 +310,11 @@ namespace GameMenuBar {
|
|||||||
UIWidgets::PaddedEnhancementCheckbox("Fast Chests", "gFastChests", true, false);
|
UIWidgets::PaddedEnhancementCheckbox("Fast Chests", "gFastChests", true, false);
|
||||||
UIWidgets::Tooltip("Kick open every chest");
|
UIWidgets::Tooltip("Kick open every chest");
|
||||||
UIWidgets::PaddedText("Chest size & texture matches contents", true, false);
|
UIWidgets::PaddedText("Chest size & texture matches contents", true, false);
|
||||||
const char* chestSizeAndTextureMatchesContentsOptions[4] = { "Disabled", "Both", "Texture Only", "Size Only"};
|
if (UIWidgets::EnhancementCombobox("gChestSizeAndTextureMatchesContents", chestSizeAndTextureMatchesContentsOptions, 0)) {
|
||||||
|
if (CVarGetInteger("gChestSizeAndTextureMatchesContents", 0) == 0) {
|
||||||
|
CVarSetInteger("gChestSizeDependsStoneOfAgony", 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
UIWidgets::Tooltip(
|
UIWidgets::Tooltip(
|
||||||
"Chest sizes and textures are changed to help identify the item inside.\n"
|
"Chest sizes and textures are changed to help identify the item inside.\n"
|
||||||
" - Major items: Large gold chests\n"
|
" - Major items: Large gold chests\n"
|
||||||
@ -376,11 +324,6 @@ namespace GameMenuBar {
|
|||||||
" - Boss keys: Vanilla size and texture\n"
|
" - Boss keys: Vanilla size and texture\n"
|
||||||
" - Skulltula Tokens: Small skulltula chest\n"
|
" - Skulltula Tokens: Small skulltula chest\n"
|
||||||
);
|
);
|
||||||
if (UIWidgets::EnhancementCombobox("gChestSizeAndTextureMatchesContents", chestSizeAndTextureMatchesContentsOptions, 4, 0)) {
|
|
||||||
if (CVarGetInteger("gChestSizeAndTextureMatchesContents", 0) == 0) {
|
|
||||||
CVarSetInteger("gChestSizeDependsStoneOfAgony", 0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (CVarGetInteger("gChestSizeAndTextureMatchesContents", 0) > 0) {
|
if (CVarGetInteger("gChestSizeAndTextureMatchesContents", 0) > 0) {
|
||||||
UIWidgets::PaddedEnhancementCheckbox("Chests of Agony", "gChestSizeDependsStoneOfAgony", true, false);
|
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::Tooltip("Only change the size/texture of chests if you have the Stone of Agony.");
|
||||||
@ -394,7 +337,7 @@ namespace GameMenuBar {
|
|||||||
UIWidgets::PaddedEnhancementCheckbox("Fast Ocarina Playback", "gFastOcarinaPlayback", true, false);
|
UIWidgets::PaddedEnhancementCheckbox("Fast Ocarina Playback", "gFastOcarinaPlayback", true, false);
|
||||||
bool forceSkipScarecrow = gSaveContext.n64ddFlag &&
|
bool forceSkipScarecrow = gSaveContext.n64ddFlag &&
|
||||||
OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_SKIP_SCARECROWS_SONG);
|
OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_SKIP_SCARECROWS_SONG);
|
||||||
const char* forceSkipScarecrowText =
|
static const char* forceSkipScarecrowText =
|
||||||
"This setting is forcefully enabled because a savefile\nwith \"Skip Scarecrow Song\" is loaded";
|
"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::Tooltip("Skip the part where the Ocarina playback is called when you play a song");
|
||||||
UIWidgets::PaddedEnhancementCheckbox("Skip Scarecrow Song", "gSkipScarecrow", true, false,
|
UIWidgets::PaddedEnhancementCheckbox("Skip Scarecrow Song", "gSkipScarecrow", true, false,
|
||||||
@ -425,8 +368,7 @@ namespace GameMenuBar {
|
|||||||
UIWidgets::PaddedEnhancementCheckbox("Prevent Dropped Ocarina Inputs", "gDpadNoDropOcarinaInput", true, false);
|
UIWidgets::PaddedEnhancementCheckbox("Prevent Dropped Ocarina Inputs", "gDpadNoDropOcarinaInput", true, false);
|
||||||
UIWidgets::Tooltip("Prevent dropping inputs when playing the ocarina quickly");
|
UIWidgets::Tooltip("Prevent dropping inputs when playing the ocarina quickly");
|
||||||
UIWidgets::PaddedText("Bunny Hood Effect", true, false);
|
UIWidgets::PaddedText("Bunny Hood Effect", true, false);
|
||||||
const char* bunnyHoodOptions[3] = { "Disabled", "Faster Run & Longer Jump", "Faster Run"};
|
UIWidgets::EnhancementCombobox("gMMBunnyHood", bunnyHoodOptions, 0);
|
||||||
UIWidgets::EnhancementCombobox("gMMBunnyHood", bunnyHoodOptions, 3, 0);
|
|
||||||
UIWidgets::Tooltip(
|
UIWidgets::Tooltip(
|
||||||
"Wearing the Bunny Hood grants a speed increase like in Majora's Mask. The longer jump option is not accounted for in randomizer logic.\n\n"
|
"Wearing the Bunny Hood grants a speed increase like in Majora's Mask. The longer jump option is not accounted for in randomizer logic.\n\n"
|
||||||
"Also disables NPC's reactions to wearing the Bunny Hood."
|
"Also disables NPC's reactions to wearing the Bunny Hood."
|
||||||
@ -453,43 +395,43 @@ namespace GameMenuBar {
|
|||||||
if (ImGui::BeginMenu("Difficulty Options"))
|
if (ImGui::BeginMenu("Difficulty Options"))
|
||||||
{
|
{
|
||||||
ImGui::Text("Damage Multiplier");
|
ImGui::Text("Damage Multiplier");
|
||||||
UIWidgets::EnhancementCombobox("gDamageMul", powers, 9, 0);
|
UIWidgets::EnhancementCombobox("gDamageMul", allPowers, 0);
|
||||||
UIWidgets::Tooltip(
|
UIWidgets::Tooltip(
|
||||||
"Modifies all sources of damage not affected by other sliders\n\
|
"Modifies all sources of damage not affected by other sliders\n"
|
||||||
2x: Can survive all common attacks from the start of the game\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\
|
"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\
|
"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\
|
"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\
|
"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\
|
"64x: Can survive trivial damage with max health without double defense\n"
|
||||||
128x: Can survive trivial damage with max health and double defense\n\
|
"128x: Can survive trivial damage with max health and double defense\n"
|
||||||
256x: Cannot survive damage"
|
"256x: Cannot survive damage"
|
||||||
);
|
);
|
||||||
UIWidgets::PaddedText("Fall Damage Multiplier", true, false);
|
UIWidgets::PaddedText("Fall Damage Multiplier", true, false);
|
||||||
UIWidgets::EnhancementCombobox("gFallDamageMul", powers, 8, 0);
|
UIWidgets::EnhancementCombobox("gFallDamageMul", subPowers, 0);
|
||||||
UIWidgets::Tooltip(
|
UIWidgets::Tooltip(
|
||||||
"Modifies all fall damage\n\
|
"Modifies all fall damage\n"
|
||||||
2x: Can survive all fall damage from the start of the game\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\
|
"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\
|
"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\
|
"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\
|
"32x: Can survive all fall damage with max health and double defense\n"
|
||||||
64x: Can survive short fall damage with double defense\n\
|
"64x: Can survive short fall damage with double defense\n"
|
||||||
128x: Cannot survive fall damage"
|
"128x: Cannot survive fall damage"
|
||||||
);
|
);
|
||||||
UIWidgets::PaddedText("Void Damage Multiplier", true, false);
|
UIWidgets::PaddedText("Void Damage Multiplier", true, false);
|
||||||
UIWidgets::EnhancementCombobox("gVoidDamageMul", powers, 7, 0);
|
UIWidgets::EnhancementCombobox("gVoidDamageMul", subSubPowers, 0);
|
||||||
UIWidgets::Tooltip(
|
UIWidgets::Tooltip(
|
||||||
"Modifies damage taken after falling into a void\n\
|
"Modifies damage taken after falling into a void\n"
|
||||||
2x: Can survive void damage from the start of the game\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\
|
"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\
|
"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\
|
"16x: Can survive void damage with max health without double defense\n"
|
||||||
32x: Can survive void damage with max health and double defense\n\
|
"32x: Can survive void damage with max health and double defense\n"
|
||||||
64x: Cannot survive void damage"
|
"64x: Cannot survive void damage"
|
||||||
);
|
);
|
||||||
UIWidgets::PaddedText("Bonk Damage Multiplier", true, false);
|
UIWidgets::PaddedText("Bonk Damage Multiplier", true, false);
|
||||||
UIWidgets::EnhancementCombobox("gBonkDamageMul", bonkDamageValues, 8, 0);
|
UIWidgets::EnhancementCombobox("gBonkDamageMul", bonkDamageValues, 0);
|
||||||
UIWidgets::Tooltip("Modifies damage taken after bonking.");
|
UIWidgets::Tooltip("Modifies damage taken after bonking.");
|
||||||
UIWidgets::PaddedEnhancementCheckbox("Spawn with full health", "gFullHealthSpawn", true, false);
|
UIWidgets::PaddedEnhancementCheckbox("Spawn with full health", "gFullHealthSpawn", true, false);
|
||||||
UIWidgets::Tooltip("Respawn with full health instead of 3 Hearts");
|
UIWidgets::Tooltip("Respawn with full health instead of 3 Hearts");
|
||||||
@ -497,7 +439,7 @@ namespace GameMenuBar {
|
|||||||
UIWidgets::Tooltip("Disables random drops, except from the Goron Pot, Dampe, and bosses");
|
UIWidgets::Tooltip("Disables random drops, except from the Goron Pot, Dampe, and bosses");
|
||||||
bool forceEnableBombchuDrops = gSaveContext.n64ddFlag &&
|
bool forceEnableBombchuDrops = gSaveContext.n64ddFlag &&
|
||||||
OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_ENABLE_BOMBCHU_DROPS) == 1;
|
OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_ENABLE_BOMBCHU_DROPS) == 1;
|
||||||
const char* forceEnableBombchuDropsText =
|
static const char* forceEnableBombchuDropsText =
|
||||||
"This setting is forcefully enabled because a savefile\nwith \"Enable Bombchu Drops\" is loaded.";
|
"This setting is forcefully enabled because a savefile\nwith \"Enable Bombchu Drops\" is loaded.";
|
||||||
UIWidgets::PaddedEnhancementCheckbox("Enable Bombchu Drops", "gBombchuDrops", true, false,
|
UIWidgets::PaddedEnhancementCheckbox("Enable Bombchu Drops", "gBombchuDrops", true, false,
|
||||||
forceEnableBombchuDrops, forceEnableBombchuDropsText, UIWidgets::CheckboxGraphics::Checkmark);
|
forceEnableBombchuDrops, forceEnableBombchuDropsText, UIWidgets::CheckboxGraphics::Checkmark);
|
||||||
@ -516,7 +458,7 @@ namespace GameMenuBar {
|
|||||||
UIWidgets::EnhancementCheckbox("Change Red Potion Effect", "gRedPotionEffect");
|
UIWidgets::EnhancementCheckbox("Change Red Potion Effect", "gRedPotionEffect");
|
||||||
UIWidgets::Tooltip("Enable the following changes to the amount of health restored by Red Potions");
|
UIWidgets::Tooltip("Enable the following changes to the amount of health restored by Red Potions");
|
||||||
bool disabledRedPotion = !CVarGetInteger("gRedPotionEffect", 0);
|
bool disabledRedPotion = !CVarGetInteger("gRedPotionEffect", 0);
|
||||||
const char* disabledTooltipRedPotion = "This option is disabled because \"Change Red Potion Effect\" is turned off";
|
static const char* disabledTooltipRedPotion = "This option is disabled because \"Change Red Potion Effect\" is turned off";
|
||||||
UIWidgets::EnhancementSliderInt("Red Potion Health: %d", "##REDPOTIONHEALTH", "gRedPotionHealth", 1, 100, "", 0, true, disabledRedPotion, disabledTooltipRedPotion);
|
UIWidgets::EnhancementSliderInt("Red Potion Health: %d", "##REDPOTIONHEALTH", "gRedPotionHealth", 1, 100, "", 0, true, disabledRedPotion, disabledTooltipRedPotion);
|
||||||
UIWidgets::Tooltip("Changes the amount of health restored by Red Potions");
|
UIWidgets::Tooltip("Changes the amount of health restored by Red Potions");
|
||||||
UIWidgets::EnhancementCheckbox("Red Potion Percent Restore", "gRedPercentRestore", disabledRedPotion, disabledTooltipRedPotion);
|
UIWidgets::EnhancementCheckbox("Red Potion Percent Restore", "gRedPercentRestore", disabledRedPotion, disabledTooltipRedPotion);
|
||||||
@ -527,7 +469,7 @@ namespace GameMenuBar {
|
|||||||
UIWidgets::EnhancementCheckbox("Change Green Potion Effect", "gGreenPotionEffect");
|
UIWidgets::EnhancementCheckbox("Change Green Potion Effect", "gGreenPotionEffect");
|
||||||
UIWidgets::Tooltip("Enable the following changes to the amount of mana restored by Green Potions");
|
UIWidgets::Tooltip("Enable the following changes to the amount of mana restored by Green Potions");
|
||||||
bool disabledGreenPotion = !CVarGetInteger("gGreenPotionEffect", 0);
|
bool disabledGreenPotion = !CVarGetInteger("gGreenPotionEffect", 0);
|
||||||
const char* disabledTooltipGreenPotion = "This option is disabled because \"Change Green Potion Effect\" is turned off";
|
static const char* disabledTooltipGreenPotion = "This option is disabled because \"Change Green Potion Effect\" is turned off";
|
||||||
UIWidgets::EnhancementSliderInt("Green Potion Mana: %d", "##GREENPOTIONMANA", "gGreenPotionMana", 1, 100, "", 0, true, disabledGreenPotion, disabledTooltipGreenPotion);
|
UIWidgets::EnhancementSliderInt("Green Potion Mana: %d", "##GREENPOTIONMANA", "gGreenPotionMana", 1, 100, "", 0, true, disabledGreenPotion, disabledTooltipGreenPotion);
|
||||||
UIWidgets::Tooltip("Changes the amount of mana restored by Green Potions, base max mana is 48, max upgraded mana is 96");
|
UIWidgets::Tooltip("Changes the amount of mana restored by Green Potions, base max mana is 48, max upgraded mana is 96");
|
||||||
UIWidgets::EnhancementCheckbox("Green Potion Percent Restore", "gGreenPercentRestore", disabledGreenPotion, disabledTooltipGreenPotion);
|
UIWidgets::EnhancementCheckbox("Green Potion Percent Restore", "gGreenPercentRestore", disabledGreenPotion, disabledTooltipGreenPotion);
|
||||||
@ -538,7 +480,7 @@ namespace GameMenuBar {
|
|||||||
UIWidgets::EnhancementCheckbox("Change Blue Potion Effects", "gBluePotionEffects");
|
UIWidgets::EnhancementCheckbox("Change Blue Potion Effects", "gBluePotionEffects");
|
||||||
UIWidgets::Tooltip("Enable the following changes to the amount of health and mana restored by Blue Potions");
|
UIWidgets::Tooltip("Enable the following changes to the amount of health and mana restored by Blue Potions");
|
||||||
bool disabledBluePotion = !CVarGetInteger("gBluePotionEffects", 0);
|
bool disabledBluePotion = !CVarGetInteger("gBluePotionEffects", 0);
|
||||||
const char* disabledTooltipBluePotion = "This option is disabled because \"Change Blue Potion Effects\" is turned off";
|
static const char* disabledTooltipBluePotion = "This option is disabled because \"Change Blue Potion Effects\" is turned off";
|
||||||
UIWidgets::EnhancementSliderInt("Blue Potion Health: %d", "##BLUEPOTIONHEALTH", "gBluePotionHealth", 1, 100, "", 0, true, disabledBluePotion, disabledTooltipBluePotion);
|
UIWidgets::EnhancementSliderInt("Blue Potion Health: %d", "##BLUEPOTIONHEALTH", "gBluePotionHealth", 1, 100, "", 0, true, disabledBluePotion, disabledTooltipBluePotion);
|
||||||
UIWidgets::Tooltip("Changes the amount of health restored by Blue Potions");
|
UIWidgets::Tooltip("Changes the amount of health restored by Blue Potions");
|
||||||
UIWidgets::EnhancementCheckbox("Blue Potion Health Percent Restore", "gBlueHealthPercentRestore", disabledBluePotion, disabledTooltipBluePotion);
|
UIWidgets::EnhancementCheckbox("Blue Potion Health Percent Restore", "gBlueHealthPercentRestore", disabledBluePotion, disabledTooltipBluePotion);
|
||||||
@ -556,7 +498,7 @@ namespace GameMenuBar {
|
|||||||
UIWidgets::EnhancementCheckbox("Change Milk Effect", "gMilkEffect");
|
UIWidgets::EnhancementCheckbox("Change Milk Effect", "gMilkEffect");
|
||||||
UIWidgets::Tooltip("Enable the following changes to the amount of health restored by Milk");
|
UIWidgets::Tooltip("Enable the following changes to the amount of health restored by Milk");
|
||||||
bool disabledMilk = !CVarGetInteger("gMilkEffect", 0);
|
bool disabledMilk = !CVarGetInteger("gMilkEffect", 0);
|
||||||
const char* disabledTooltipMilk = "This option is disabled because \"Change Milk Effect\" is turned off";
|
static const char* disabledTooltipMilk = "This option is disabled because \"Change Milk Effect\" is turned off";
|
||||||
UIWidgets::EnhancementSliderInt("Milk Health: %d", "##MILKHEALTH", "gMilkHealth", 1, 100, "", 0, true, disabledMilk, disabledTooltipMilk);
|
UIWidgets::EnhancementSliderInt("Milk Health: %d", "##MILKHEALTH", "gMilkHealth", 1, 100, "", 0, true, disabledMilk, disabledTooltipMilk);
|
||||||
UIWidgets::Tooltip("Changes the amount of health restored by Milk");
|
UIWidgets::Tooltip("Changes the amount of health restored by Milk");
|
||||||
UIWidgets::EnhancementCheckbox("Milk Percent Restore", "gMilkPercentRestore", disabledMilk, disabledTooltipMilk);
|
UIWidgets::EnhancementCheckbox("Milk Percent Restore", "gMilkPercentRestore", disabledMilk, disabledTooltipMilk);
|
||||||
@ -567,7 +509,7 @@ namespace GameMenuBar {
|
|||||||
UIWidgets::EnhancementCheckbox("Separate Half Milk Effect", "gSeparateHalfMilkEffect", disabledMilk, disabledTooltipMilk);
|
UIWidgets::EnhancementCheckbox("Separate Half Milk Effect", "gSeparateHalfMilkEffect", disabledMilk, disabledTooltipMilk);
|
||||||
UIWidgets::Tooltip("Enable the following changes to the amount of health restored by Half Milk\nIf this is disabled, Half Milk will behave the same as Full Milk.");
|
UIWidgets::Tooltip("Enable the following changes to the amount of health restored by Half Milk\nIf this is disabled, Half Milk will behave the same as Full Milk.");
|
||||||
bool disabledHalfMilk = disabledMilk || !CVarGetInteger("gSeparateHalfMilkEffect", 0);
|
bool disabledHalfMilk = disabledMilk || !CVarGetInteger("gSeparateHalfMilkEffect", 0);
|
||||||
const char* disabledTooltipHalfMilk = "This option is disabled because \"Separate Half Milk Effect\" is turned off";
|
static const char* disabledTooltipHalfMilk = "This option is disabled because \"Separate Half Milk Effect\" is turned off";
|
||||||
UIWidgets::EnhancementSliderInt("Half Milk Health: %d", "##HALFMILKHEALTH", "gHalfMilkHealth", 1, 100, "", 0, true, disabledHalfMilk, disabledTooltipHalfMilk);
|
UIWidgets::EnhancementSliderInt("Half Milk Health: %d", "##HALFMILKHEALTH", "gHalfMilkHealth", 1, 100, "", 0, true, disabledHalfMilk, disabledTooltipHalfMilk);
|
||||||
UIWidgets::Tooltip("Changes the amount of health restored by Half Milk");
|
UIWidgets::Tooltip("Changes the amount of health restored by Half Milk");
|
||||||
UIWidgets::EnhancementCheckbox("Half Milk Percent Restore", "gHalfMilkPercentRestore", disabledHalfMilk, disabledTooltipHalfMilk);
|
UIWidgets::EnhancementCheckbox("Half Milk Percent Restore", "gHalfMilkPercentRestore", disabledHalfMilk, disabledTooltipHalfMilk);
|
||||||
@ -578,7 +520,7 @@ namespace GameMenuBar {
|
|||||||
UIWidgets::EnhancementCheckbox("Change Fairy Effect", "gFairyEffect");
|
UIWidgets::EnhancementCheckbox("Change Fairy Effect", "gFairyEffect");
|
||||||
UIWidgets::Tooltip("Enable the following changes to the amount of health restored by Fairies");
|
UIWidgets::Tooltip("Enable the following changes to the amount of health restored by Fairies");
|
||||||
bool disabledFairy = !CVarGetInteger("gFairyEffect", 0);
|
bool disabledFairy = !CVarGetInteger("gFairyEffect", 0);
|
||||||
const char* disabledTooltipFairy = "This option is disabled because \"Change Fairy Effect\" is turned off";
|
static const char* disabledTooltipFairy = "This option is disabled because \"Change Fairy Effect\" is turned off";
|
||||||
UIWidgets::EnhancementSliderInt("Fairy: %d", "##FAIRYHEALTH", "gFairyHealth", 1, 100, "", 0, true, disabledFairy, disabledTooltipFairy);
|
UIWidgets::EnhancementSliderInt("Fairy: %d", "##FAIRYHEALTH", "gFairyHealth", 1, 100, "", 0, true, disabledFairy, disabledTooltipFairy);
|
||||||
UIWidgets::Tooltip("Changes the amount of health restored by Fairies");
|
UIWidgets::Tooltip("Changes the amount of health restored by Fairies");
|
||||||
UIWidgets::EnhancementCheckbox("Fairy Percent Restore", "gFairyPercentRestore", disabledFairy, disabledTooltipFairy);
|
UIWidgets::EnhancementCheckbox("Fairy Percent Restore", "gFairyPercentRestore", disabledFairy, disabledTooltipFairy);
|
||||||
@ -589,7 +531,7 @@ namespace GameMenuBar {
|
|||||||
UIWidgets::EnhancementCheckbox("Change Fairy Revive Effect", "gFairyReviveEffect");
|
UIWidgets::EnhancementCheckbox("Change Fairy Revive Effect", "gFairyReviveEffect");
|
||||||
UIWidgets::Tooltip("Enable the following changes to the amount of health restored by Fairy Revivals");
|
UIWidgets::Tooltip("Enable the following changes to the amount of health restored by Fairy Revivals");
|
||||||
bool disabledFairyRevive = !CVarGetInteger("gFairyReviveEffect", 0);
|
bool disabledFairyRevive = !CVarGetInteger("gFairyReviveEffect", 0);
|
||||||
const char* disabledTooltipFairyRevive = "This option is disabled because \"Change Fairy Revive Effect\" is turned off";
|
static const char* disabledTooltipFairyRevive = "This option is disabled because \"Change Fairy Revive Effect\" is turned off";
|
||||||
UIWidgets::EnhancementSliderInt("Fairy Revival: %d", "##FAIRYREVIVEHEALTH", "gFairyReviveHealth", 1, 100, "", 0, true, disabledFairyRevive, disabledTooltipFairyRevive);
|
UIWidgets::EnhancementSliderInt("Fairy Revival: %d", "##FAIRYREVIVEHEALTH", "gFairyReviveHealth", 1, 100, "", 0, true, disabledFairyRevive, disabledTooltipFairyRevive);
|
||||||
UIWidgets::Tooltip("Changes the amount of health restored by Fairy Revivals");
|
UIWidgets::Tooltip("Changes the amount of health restored by Fairy Revivals");
|
||||||
UIWidgets::EnhancementCheckbox("Fairy Revive Percent Restore", "gFairyRevivePercentRestore", disabledFairyRevive, disabledTooltipFairyRevive);
|
UIWidgets::EnhancementCheckbox("Fairy Revive Percent Restore", "gFairyRevivePercentRestore", disabledFairyRevive, disabledTooltipFairyRevive);
|
||||||
@ -604,14 +546,14 @@ namespace GameMenuBar {
|
|||||||
UIWidgets::EnhancementCheckbox("Customize Behavior", "gCustomizeShootingGallery");
|
UIWidgets::EnhancementCheckbox("Customize Behavior", "gCustomizeShootingGallery");
|
||||||
UIWidgets::Tooltip("Turn on/off changes to the shooting gallery behavior");
|
UIWidgets::Tooltip("Turn on/off changes to the shooting gallery behavior");
|
||||||
bool disabled = !CVarGetInteger("gCustomizeShootingGallery", 0);
|
bool disabled = !CVarGetInteger("gCustomizeShootingGallery", 0);
|
||||||
const char* disabledTooltip = "This option is disabled because \"Customize Behavior\" is turned off";
|
static const char* disabledTooltip = "This option is disabled because \"Customize Behavior\" is turned off";
|
||||||
UIWidgets::PaddedEnhancementCheckbox("Instant Win", "gInstantShootingGalleryWin", true, false, disabled, disabledTooltip);
|
UIWidgets::PaddedEnhancementCheckbox("Instant Win", "gInstantShootingGalleryWin", true, false, disabled, disabledTooltip);
|
||||||
UIWidgets::Tooltip("Skips the shooting gallery minigame");
|
UIWidgets::Tooltip("Skips the shooting gallery minigame");
|
||||||
UIWidgets::PaddedEnhancementCheckbox("No Rupee Randomization", "gConstantAdultGallery", true, false, disabled, disabledTooltip);
|
UIWidgets::PaddedEnhancementCheckbox("No Rupee Randomization", "gConstantAdultGallery", true, false, disabled, disabledTooltip);
|
||||||
UIWidgets::Tooltip("Forces the rupee order to not be randomized as adult, making it the same as chlid");
|
UIWidgets::Tooltip("Forces the rupee order to not be randomized as adult, making it the same as chlid");
|
||||||
UIWidgets::PaddedEnhancementSliderInt("Child Starting Ammunition: %d", "##cShootingGalleryAmmunition", "gChildShootingGalleryAmmunition", 10, 30, "", 15, false, true, false, disabled, disabledTooltip);
|
UIWidgets::PaddedEnhancementSliderInt("Child Starting Ammunition: %d", "##cShootingGalleryAmmunition", "gChildShootingGalleryAmmunition", 10, 30, "", 15, true, true, false, disabled, disabledTooltip);
|
||||||
UIWidgets::Tooltip("The ammunition at the start of the shooting gallery minigame as a child");
|
UIWidgets::Tooltip("The ammunition at the start of the shooting gallery minigame as a child");
|
||||||
UIWidgets::PaddedEnhancementSliderInt("Adult Starting Ammunition: %d", "##aShootingGalleryAmmunition", "gAdultShootingGalleryAmmunition", 10, 30, "", 15, false, true, false, disabled, disabledTooltip);
|
UIWidgets::PaddedEnhancementSliderInt("Adult Starting Ammunition: %d", "##aShootingGalleryAmmunition", "gAdultShootingGalleryAmmunition", 10, 30, "", 15, true, true, false, disabled, disabledTooltip);
|
||||||
UIWidgets::Tooltip("The ammunition at the start of the shooting gallery minigame as an adult");
|
UIWidgets::Tooltip("The ammunition at the start of the shooting gallery minigame as an adult");
|
||||||
ImGui::EndMenu();
|
ImGui::EndMenu();
|
||||||
}
|
}
|
||||||
@ -622,12 +564,12 @@ namespace GameMenuBar {
|
|||||||
UIWidgets::EnhancementCheckbox("Customize Behavior", "gCustomizeBombchuBowling");
|
UIWidgets::EnhancementCheckbox("Customize Behavior", "gCustomizeBombchuBowling");
|
||||||
UIWidgets::Tooltip("Turn on/off changes to the bombchu bowling behavior");
|
UIWidgets::Tooltip("Turn on/off changes to the bombchu bowling behavior");
|
||||||
bool disabled = CVarGetInteger("gCustomizeBombchuBowling", 0) == 0;
|
bool disabled = CVarGetInteger("gCustomizeBombchuBowling", 0) == 0;
|
||||||
const char* disabledTooltip = "This option is disabled because \"Customize Behavior\" is turned off";
|
static const char* disabledTooltip = "This option is disabled because \"Customize Behavior\" is turned off";
|
||||||
UIWidgets::PaddedEnhancementCheckbox("Remove Small Cucco", "gBombchuBowlingNoSmallCucco", true, false, disabled, disabledTooltip);
|
UIWidgets::PaddedEnhancementCheckbox("Remove Small Cucco", "gBombchuBowlingNoSmallCucco", true, false, disabled, disabledTooltip);
|
||||||
UIWidgets::Tooltip("Prevents the small cucco from appearing in the bombchu bowling minigame");
|
UIWidgets::Tooltip("Prevents the small cucco from appearing in the bombchu bowling minigame");
|
||||||
UIWidgets::PaddedEnhancementCheckbox("Remove Big Cucco", "gBombchuBowlingNoBigCucco", true, false, disabled, disabledTooltip);
|
UIWidgets::PaddedEnhancementCheckbox("Remove Big Cucco", "gBombchuBowlingNoBigCucco", true, false, disabled, disabledTooltip);
|
||||||
UIWidgets::Tooltip("Prevents the big cucco from appearing in the bombchu bowling minigame");
|
UIWidgets::Tooltip("Prevents the big cucco from appearing in the bombchu bowling minigame");
|
||||||
UIWidgets::PaddedEnhancementSliderInt("Bombchu Count: %d", "##cBombchuBowlingAmmunition", "gBombchuBowlingAmmunition", 3, 20, "", 10, false, true, false, disabled, disabledTooltip);
|
UIWidgets::PaddedEnhancementSliderInt("Bombchu Count: %d", "##cBombchuBowlingAmmunition", "gBombchuBowlingAmmunition", 3, 20, "", 10, true, true, false, disabled, disabledTooltip);
|
||||||
UIWidgets::Tooltip("The number of bombchus available at the start of the bombchu bowling minigame");
|
UIWidgets::Tooltip("The number of bombchus available at the start of the bombchu bowling minigame");
|
||||||
ImGui::EndMenu();
|
ImGui::EndMenu();
|
||||||
}
|
}
|
||||||
@ -638,16 +580,16 @@ namespace GameMenuBar {
|
|||||||
UIWidgets::EnhancementCheckbox("Customize Behavior", "gCustomizeFishing");
|
UIWidgets::EnhancementCheckbox("Customize Behavior", "gCustomizeFishing");
|
||||||
UIWidgets::Tooltip("Turn on/off changes to the fishing behavior");
|
UIWidgets::Tooltip("Turn on/off changes to the fishing behavior");
|
||||||
bool disabled = !CVarGetInteger("gCustomizeFishing", 0);
|
bool disabled = !CVarGetInteger("gCustomizeFishing", 0);
|
||||||
const char* disabledTooltip = "This option is disabled because \"Customize Behavior\" is turned off";
|
static const char* disabledTooltip = "This option is disabled because \"Customize Behavior\" is turned off";
|
||||||
UIWidgets::PaddedEnhancementCheckbox("Instant Fishing", "gInstantFishing", true, false, disabled, disabledTooltip);
|
UIWidgets::PaddedEnhancementCheckbox("Instant Fishing", "gInstantFishing", true, false, disabled, disabledTooltip);
|
||||||
UIWidgets::Tooltip("All fish will be caught instantly");
|
UIWidgets::Tooltip("All fish will be caught instantly");
|
||||||
UIWidgets::PaddedEnhancementCheckbox("Guarantee Bite", "gGuaranteeFishingBite", true, false, disabled, disabledTooltip);
|
UIWidgets::PaddedEnhancementCheckbox("Guarantee Bite", "gGuaranteeFishingBite", true, false, disabled, disabledTooltip);
|
||||||
UIWidgets::Tooltip("When a line is stable, guarantee bite. Otherwise use default logic");
|
UIWidgets::Tooltip("When a line is stable, guarantee bite. Otherwise use default logic");
|
||||||
UIWidgets::PaddedEnhancementCheckbox("Fish Never Escape", "gFishNeverEscape", true, false, disabled, disabledTooltip);
|
UIWidgets::PaddedEnhancementCheckbox("Fish Never Escape", "gFishNeverEscape", true, false, disabled, disabledTooltip);
|
||||||
UIWidgets::Tooltip("Once a hook has been set, fish will never let go while being reeled in.");
|
UIWidgets::Tooltip("Once a hook has been set, fish will never let go while being reeled in.");
|
||||||
UIWidgets::PaddedEnhancementSliderInt("Child Minimum Weight: %d", "##cMinimumWeight", "gChildMinimumWeightFish", 3, 10, "", 10, false, true, false, disabled, disabledTooltip);
|
UIWidgets::PaddedEnhancementSliderInt("Child Minimum Weight: %d", "##cMinimumWeight", "gChildMinimumWeightFish", 3, 10, "", 10, true, true, false, disabled, disabledTooltip);
|
||||||
UIWidgets::Tooltip("The minimum weight for the unique fishing reward as a child");
|
UIWidgets::Tooltip("The minimum weight for the unique fishing reward as a child");
|
||||||
UIWidgets::PaddedEnhancementSliderInt("Adult Minimum Weight: %d", "##aMinimumWeight", "gAdultMinimumWeightFish", 6, 13, "", 13, false, true, false, disabled, disabledTooltip);
|
UIWidgets::PaddedEnhancementSliderInt("Adult Minimum Weight: %d", "##aMinimumWeight", "gAdultMinimumWeightFish", 6, 13, "", 13, true, true, false, disabled, disabledTooltip);
|
||||||
UIWidgets::Tooltip("The minimum weight for the unique fishing reward as an adult");
|
UIWidgets::Tooltip("The minimum weight for the unique fishing reward as an adult");
|
||||||
ImGui::EndMenu();
|
ImGui::EndMenu();
|
||||||
}
|
}
|
||||||
@ -656,7 +598,7 @@ namespace GameMenuBar {
|
|||||||
|
|
||||||
UIWidgets::PaddedEnhancementCheckbox("Rupee Dash Mode", "gRupeeDash", true, false);
|
UIWidgets::PaddedEnhancementCheckbox("Rupee Dash Mode", "gRupeeDash", true, false);
|
||||||
UIWidgets::Tooltip("Rupees reduced over time, Link suffers damage when the count hits 0.");
|
UIWidgets::Tooltip("Rupees reduced over time, Link suffers damage when the count hits 0.");
|
||||||
UIWidgets::PaddedEnhancementSliderInt("Rupee Dash Interval: %d", "##DashInterval", "gDashInterval", 3, 5, "", 5, false, true, false,
|
UIWidgets::PaddedEnhancementSliderInt("Rupee Dash Interval: %d", "##DashInterval", "gDashInterval", 3, 5, "", 5, true, true, false,
|
||||||
!CVarGetInteger("gRupeeDash", 0), "This option is disabled because \"Rupee Dash Mode\" is turned off");
|
!CVarGetInteger("gRupeeDash", 0), "This option is disabled because \"Rupee Dash Mode\" is turned off");
|
||||||
UIWidgets::Tooltip("Interval between Rupee reduction in Rupee Dash Mode");
|
UIWidgets::Tooltip("Interval between Rupee reduction in Rupee Dash Mode");
|
||||||
|
|
||||||
@ -701,7 +643,7 @@ namespace GameMenuBar {
|
|||||||
// Blue Fire Arrows
|
// Blue Fire Arrows
|
||||||
bool forceEnableBlueFireArrows = gSaveContext.n64ddFlag &&
|
bool forceEnableBlueFireArrows = gSaveContext.n64ddFlag &&
|
||||||
OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_BLUE_FIRE_ARROWS);
|
OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_BLUE_FIRE_ARROWS);
|
||||||
const char* forceEnableBlueFireArrowsText =
|
static const char* forceEnableBlueFireArrowsText =
|
||||||
"This setting is forcefully enabled because a savefile\nwith \"Blue Fire Arrows\" is loaded.";
|
"This setting is forcefully enabled because a savefile\nwith \"Blue Fire Arrows\" is loaded.";
|
||||||
UIWidgets::PaddedEnhancementCheckbox("Blue Fire Arrows", "gBlueFireArrows", true, false,
|
UIWidgets::PaddedEnhancementCheckbox("Blue Fire Arrows", "gBlueFireArrows", true, false,
|
||||||
forceEnableBlueFireArrows, forceEnableBlueFireArrowsText, UIWidgets::CheckboxGraphics::Checkmark);
|
forceEnableBlueFireArrows, forceEnableBlueFireArrowsText, UIWidgets::CheckboxGraphics::Checkmark);
|
||||||
@ -710,7 +652,7 @@ namespace GameMenuBar {
|
|||||||
// Sunlight Arrows
|
// Sunlight Arrows
|
||||||
bool forceEnableSunLightArrows = gSaveContext.n64ddFlag &&
|
bool forceEnableSunLightArrows = gSaveContext.n64ddFlag &&
|
||||||
OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_SUNLIGHT_ARROWS);
|
OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_SUNLIGHT_ARROWS);
|
||||||
const char* forceEnableSunLightArrowsText =
|
static const char* forceEnableSunLightArrowsText =
|
||||||
"This setting is forcefully enabled because a savefile\nwith \"Sunlight Arrows\" is loaded.";
|
"This setting is forcefully enabled because a savefile\nwith \"Sunlight Arrows\" is loaded.";
|
||||||
UIWidgets::PaddedEnhancementCheckbox("Sunlight Arrows", "gSunlightArrows", true, false,
|
UIWidgets::PaddedEnhancementCheckbox("Sunlight Arrows", "gSunlightArrows", true, false,
|
||||||
forceEnableSunLightArrows, forceEnableSunLightArrowsText, UIWidgets::CheckboxGraphics::Checkmark);
|
forceEnableSunLightArrows, forceEnableSunLightArrowsText, UIWidgets::CheckboxGraphics::Checkmark);
|
||||||
@ -736,7 +678,7 @@ namespace GameMenuBar {
|
|||||||
UIWidgets::EnhancementRadioButton("Rotate Link with Right Stick", "gPauseLiveLinkRotation", 3);
|
UIWidgets::EnhancementRadioButton("Rotate Link with Right Stick", "gPauseLiveLinkRotation", 3);
|
||||||
UIWidgets::Tooltip("Allow you to rotate Link on the Equipment menu with the Right Stick\nYou can zoom in by pointing up and reset Link's rotation by pointing down");
|
UIWidgets::Tooltip("Allow you to rotate Link on the Equipment menu with the Right Stick\nYou can zoom in by pointing up and reset Link's rotation by pointing down");
|
||||||
if (CVarGetInteger("gPauseLiveLinkRotation", 0) != 0) {
|
if (CVarGetInteger("gPauseLiveLinkRotation", 0) != 0) {
|
||||||
UIWidgets::EnhancementSliderInt("Rotation Speed: %d", "##MinRotationSpeed", "gPauseLiveLinkRotationSpeed", 1, 20, "");
|
UIWidgets::EnhancementSliderInt("Rotation Speed: %d", "##MinRotationSpeed", "gPauseLiveLinkRotationSpeed", 1, 20, "", 1);
|
||||||
}
|
}
|
||||||
UIWidgets::PaddedSeparator();
|
UIWidgets::PaddedSeparator();
|
||||||
ImGui::Text("Static loop");
|
ImGui::Text("Static loop");
|
||||||
@ -764,7 +706,7 @@ namespace GameMenuBar {
|
|||||||
UIWidgets::EnhancementRadioButton("Random cycle (Idle)", "gPauseLiveLink", 17);
|
UIWidgets::EnhancementRadioButton("Random cycle (Idle)", "gPauseLiveLink", 17);
|
||||||
UIWidgets::Tooltip("Randomize the animation played on the menu after a certain time (Idle animations only)");
|
UIWidgets::Tooltip("Randomize the animation played on the menu after a certain time (Idle animations only)");
|
||||||
if (CVarGetInteger("gPauseLiveLink", 0) >= 16) {
|
if (CVarGetInteger("gPauseLiveLink", 0) >= 16) {
|
||||||
UIWidgets::EnhancementSliderInt("Frame to wait: %d", "##MinFrameCount", "gMinFrameCount", 1, 1000, "", 0, true);
|
UIWidgets::EnhancementSliderInt("Frame to wait: %d", "##MinFrameCount", "gMinFrameCount", 1, 1000, "", 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui::EndMenu();
|
ImGui::EndMenu();
|
||||||
@ -782,8 +724,7 @@ namespace GameMenuBar {
|
|||||||
UIWidgets::PaddedEnhancementCheckbox("Always show dungeon entrances", "gAlwaysShowDungeonMinimapIcon", true, false);
|
UIWidgets::PaddedEnhancementCheckbox("Always show dungeon entrances", "gAlwaysShowDungeonMinimapIcon", true, false);
|
||||||
UIWidgets::Tooltip("Always shows dungeon entrance icons on the minimap");
|
UIWidgets::Tooltip("Always shows dungeon entrance icons on the minimap");
|
||||||
UIWidgets::PaddedText("Fix Vanishing Paths", true, false);
|
UIWidgets::PaddedText("Fix Vanishing Paths", true, false);
|
||||||
const char* zFightingOptions[3] = { "Disabled", "Consistent Vanish", "No Vanish" };
|
UIWidgets::EnhancementCombobox("gDirtPathFix", zFightingOptions, 0);
|
||||||
UIWidgets::EnhancementCombobox("gDirtPathFix", zFightingOptions, 3, 0);
|
|
||||||
UIWidgets::Tooltip("Disabled: Paths vanish more the higher the resolution (Z-fighting is based on resolution)\n"
|
UIWidgets::Tooltip("Disabled: Paths vanish more the higher the resolution (Z-fighting is based on resolution)\n"
|
||||||
"Consistent: Certain paths vanish the same way in all resolutions\n"
|
"Consistent: Certain paths vanish the same way in all resolutions\n"
|
||||||
"No Vanish: Paths do not vanish, Link seems to sink in to some paths\n"
|
"No Vanish: Paths do not vanish, Link seems to sink in to some paths\n"
|
||||||
@ -863,9 +804,8 @@ namespace GameMenuBar {
|
|||||||
|
|
||||||
// Autosave enum value of 1 is the default in presets and the old checkbox "on" state for backwards compatibility
|
// Autosave enum value of 1 is the default in presets and the old checkbox "on" state for backwards compatibility
|
||||||
UIWidgets::PaddedText("Autosave", false, true);
|
UIWidgets::PaddedText("Autosave", false, true);
|
||||||
const char* autosaveLabels[] = { "Off", "New Location + Major Item", "New Location + Any Item", "New Location", "Major Item", "Any Item" };
|
UIWidgets::EnhancementCombobox("gAutosave", autosaveLabels, 0);
|
||||||
UIWidgets::EnhancementCombobox("gAutosave", autosaveLabels, (sizeof(autosaveLabels) / sizeof(autosaveLabels[0])), CVarGetInteger("gAutosave", 0));
|
UIWidgets::Tooltip("Automatically save the game when changing locations and/or obtaining items\n"
|
||||||
UIWidgets::Tooltip("Automatically save the game every time a new area is entered and/or item is obtained\n"
|
|
||||||
"Major items exclude rupees and health/magic/ammo refills (but include bombchus unless bombchu drops are enabled)");
|
"Major items exclude rupees and health/magic/ammo refills (but include bombchus unless bombchu drops are enabled)");
|
||||||
|
|
||||||
UIWidgets::Spacer(0);
|
UIWidgets::Spacer(0);
|
||||||
@ -907,107 +847,86 @@ namespace GameMenuBar {
|
|||||||
|
|
||||||
EXPERIMENTAL();
|
EXPERIMENTAL();
|
||||||
|
|
||||||
const char* fps_cvar = "gInterpolationFPS";
|
{ // FPS Slider
|
||||||
{
|
const int minFps = 20;
|
||||||
int minFps = 20;
|
const int maxFps = Ship::Window::GetInstance()->GetCurrentRefreshRate();
|
||||||
int maxFps = Ship::Window::GetInstance()->GetCurrentRefreshRate();
|
int currentFps = fmax(fmin(OTRGlobals::Instance->GetInterpolationFPS(), maxFps), minFps);
|
||||||
|
|
||||||
int val = OTRGlobals::Instance->GetInterpolationFPS();
|
|
||||||
val = fmax(fmin(val, maxFps), 20);
|
|
||||||
|
|
||||||
#ifdef __WIIU__
|
#ifdef __WIIU__
|
||||||
// only support divisors of 60 on the Wii U
|
// only support divisors of 60 on the Wii U
|
||||||
val = 60 / (60 / val);
|
if (currentFps > 60) {
|
||||||
#endif
|
currentFps = 60;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
currentFps = 60 / (60 / currentFps);
|
||||||
|
}
|
||||||
|
|
||||||
int fps = val;
|
int fpsSlider = 1;
|
||||||
|
if (currentFps == 20) {
|
||||||
if (fps == 20)
|
|
||||||
{
|
|
||||||
ImGui::Text("Frame interpolation: Off");
|
ImGui::Text("Frame interpolation: Off");
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
{
|
ImGui::Text("Frame interpolation: %d FPS", currentFps);
|
||||||
ImGui::Text("Frame interpolation: %d FPS", fps);
|
if (currentFps == 30) {
|
||||||
|
fpsSlider = 2;
|
||||||
|
}
|
||||||
|
else { // currentFps == 60
|
||||||
|
fpsSlider = 3;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CVarGetInteger("gMatchRefreshRate", 0)) {
|
if (CVarGetInteger("gMatchRefreshRate", 0)) {
|
||||||
ImGui::PushItemFlag(ImGuiItemFlags_Disabled, true);
|
UIWidgets::DisableComponent(ImGui::GetStyle().Alpha * 0.5f);
|
||||||
ImGui::PushStyleVar(ImGuiStyleVar_Alpha, ImGui::GetStyle().Alpha * 0.5f);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string MinusBTNFPSI = " - ##FPSInterpolation";
|
if (ImGui::Button(" - ##WiiUFPS")) {
|
||||||
std::string PlusBTNFPSI = " + ##FPSInterpolation";
|
fpsSlider--;
|
||||||
if (ImGui::Button(MinusBTNFPSI.c_str())) {
|
|
||||||
#ifdef __WIIU__
|
|
||||||
if (val >= 60) val = 30;
|
|
||||||
else val = 20;
|
|
||||||
#else
|
|
||||||
val--;
|
|
||||||
#endif
|
|
||||||
CVarSetInteger(fps_cvar, val);
|
|
||||||
SohImGui::RequestCvarSaveOnNextTick();
|
|
||||||
}
|
}
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
ImGui::SetCursorPosX(ImGui::GetCursorPosX() - 7.0f);
|
ImGui::SetCursorPosX(ImGui::GetCursorPosX() - 7.0f);
|
||||||
#ifdef __SWITCH__
|
|
||||||
ImGui::PushItemWidth(ImGui::GetWindowSize().x - 110.0f);
|
|
||||||
#elif defined(__WIIU__)
|
|
||||||
ImGui::PushItemWidth(ImGui::GetWindowSize().x - 79.0f * 2);
|
|
||||||
#else
|
|
||||||
ImGui::PushItemWidth(ImGui::GetWindowSize().x - 79.0f);
|
|
||||||
#endif
|
|
||||||
if (ImGui::SliderInt("##FPSInterpolation", &val, minFps, maxFps, "", ImGuiSliderFlags_AlwaysClamp))
|
|
||||||
{
|
|
||||||
#ifdef __WIIU__
|
|
||||||
// only support divisors of 60 on the Wii U
|
|
||||||
val = 60 / (60 / val);
|
|
||||||
#endif
|
|
||||||
if (val > 360)
|
|
||||||
{
|
|
||||||
val = 360;
|
|
||||||
}
|
|
||||||
else if (val < 20)
|
|
||||||
{
|
|
||||||
val = 20;
|
|
||||||
}
|
|
||||||
|
|
||||||
CVarSetInteger(fps_cvar, val);
|
ImGui::SliderInt("##WiiUFPSSlider", &fpsSlider, 1, 3, "", ImGuiSliderFlags_AlwaysClamp);
|
||||||
SohImGui::RequestCvarSaveOnNextTick();
|
|
||||||
|
ImGui::SameLine();
|
||||||
|
ImGui::SetCursorPosX(ImGui::GetCursorPosX() - 7.0f);
|
||||||
|
if (ImGui::Button(" + ##WiiUFPS")) {
|
||||||
|
fpsSlider++;
|
||||||
}
|
}
|
||||||
ImGui::PopItemWidth();
|
|
||||||
|
if (CVarGetInteger("gMatchRefreshRate", 0)) {
|
||||||
|
UIWidgets::ReEnableComponent("");
|
||||||
|
}
|
||||||
|
if (fpsSlider > 3) {
|
||||||
|
fpsSlider = 3;
|
||||||
|
}
|
||||||
|
else if (fpsSlider < 1) {
|
||||||
|
fpsSlider = 1;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (fpsSlider == 1) {
|
||||||
|
currentFps = 20;
|
||||||
|
}
|
||||||
|
else if (fpsSlider == 2) {
|
||||||
|
currentFps = 30;
|
||||||
|
}
|
||||||
|
else if (fpsSlider == 3) {
|
||||||
|
currentFps = 60;
|
||||||
|
}
|
||||||
|
CVarSetInteger("gInterpolationFPS", currentFps);
|
||||||
|
SohImGui::RequestCvarSaveOnNextTick();
|
||||||
|
#else
|
||||||
|
UIWidgets::EnhancementSliderInt((currentFps == 20) ? "Frame interpolation: Off" : "Frame interpolation: %d FPS",
|
||||||
|
"##FPSInterpolation", "gInterpolationFPS", minFps, maxFps, "", 20, true, CVarGetInteger("gMatchRefreshRate", 0));
|
||||||
|
#endif
|
||||||
UIWidgets::Tooltip("Interpolate extra frames to get smoother graphics\n"
|
UIWidgets::Tooltip("Interpolate extra frames to get smoother graphics\n"
|
||||||
"Set to match your monitor's refresh rate, or a divisor of it\n"
|
"Set to match your monitor's refresh rate, or a divisor of it\n"
|
||||||
"A higher target FPS than your monitor's refresh rate will just waste resources, "
|
"A higher target FPS than your monitor's refresh rate will just waste resources, and might give a worse result.\n"
|
||||||
"and might give a worse result.\n"
|
|
||||||
"For consistent input lag, set this value and your monitor's refresh rate to a multiple of 20\n"
|
"For consistent input lag, set this value and your monitor's refresh rate to a multiple of 20\n"
|
||||||
"Ctrl+Click for keyboard input");
|
"Ctrl+Click for keyboard input");
|
||||||
|
} // END FPS Slider
|
||||||
|
|
||||||
ImGui::SameLine();
|
UIWidgets::PaddedEnhancementCheckbox("Match Refresh Rate", "gMatchRefreshRate", true, false);
|
||||||
ImGui::SetCursorPosX(ImGui::GetCursorPosX() - 7.0f);
|
|
||||||
if (ImGui::Button(PlusBTNFPSI.c_str())) {
|
|
||||||
#ifdef __WIIU__
|
|
||||||
if (val <= 20) val = 30;
|
|
||||||
else val = 60;
|
|
||||||
#else
|
|
||||||
val++;
|
|
||||||
#endif
|
|
||||||
CVarSetInteger(fps_cvar, val);
|
|
||||||
SohImGui::RequestCvarSaveOnNextTick();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (CVarGetInteger("gMatchRefreshRate", 0)) {
|
|
||||||
ImGui::PopItemFlag();
|
|
||||||
ImGui::PopStyleVar(1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
UIWidgets::Spacer(0);
|
|
||||||
UIWidgets::EnhancementCheckbox("Match Refresh Rate", "gMatchRefreshRate");
|
|
||||||
UIWidgets::Tooltip("Matches interpolation value to the current game's window refresh rate");
|
UIWidgets::Tooltip("Matches interpolation value to the current game's window refresh rate");
|
||||||
UIWidgets::Spacer(0);
|
|
||||||
|
|
||||||
UIWidgets::EnhancementCheckbox("Disable LOD", "gDisableLOD");
|
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");
|
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 (UIWidgets::PaddedEnhancementCheckbox("Disable Draw Distance", "gDisableDrawDistance", true, false)) {
|
||||||
if (CVarGetInteger("gDisableDrawDistance", 0) == 0) {
|
if (CVarGetInteger("gDisableDrawDistance", 0) == 0) {
|
||||||
@ -1024,19 +943,10 @@ namespace GameMenuBar {
|
|||||||
|
|
||||||
#ifdef __SWITCH__
|
#ifdef __SWITCH__
|
||||||
UIWidgets::Spacer(0);
|
UIWidgets::Spacer(0);
|
||||||
int slot = CVarGetInteger("gSwitchPerfMode", (int)Ship::SwitchProfiles::STOCK);
|
|
||||||
ImGui::Text("Switch performance mode");
|
ImGui::Text("Switch performance mode");
|
||||||
if (ImGui::BeginCombo("##perf", SWITCH_CPU_PROFILES[slot])) {
|
if (UIWidgets::EnhancementCombobox("gSwitchPerfMode", SWITCH_CPU_PROFILES, (int)Ship::SwitchProfiles::STOCK)) {
|
||||||
for (int sId = 0; sId <= Ship::SwitchProfiles::POWERSAVINGM3; sId++) {
|
SPDLOG_INFO("Profile:: %s", SWITCH_CPU_PROFILES[CVarGetInteger("gSwitchPerfMode", (int)Ship::SwitchProfiles::STOCK)]);
|
||||||
if (ImGui::Selectable(SWITCH_CPU_PROFILES[sId], sId == slot)) {
|
Ship::Switch::ApplyOverclock();
|
||||||
SPDLOG_INFO("Profile:: %s", SWITCH_CPU_PROFILES[sId]);
|
|
||||||
CVarSetInteger("gSwitchPerfMode", sId);
|
|
||||||
Ship::Switch::ApplyOverclock();
|
|
||||||
SohImGui::RequestCvarSaveOnNextTick();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
ImGui::EndCombo();
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -1098,8 +1008,7 @@ namespace GameMenuBar {
|
|||||||
static int32_t lastBetaQuestWorld = betaQuestWorld;
|
static int32_t lastBetaQuestWorld = betaQuestWorld;
|
||||||
|
|
||||||
if (!isBetaQuestEnabled) {
|
if (!isBetaQuestEnabled) {
|
||||||
ImGui::PushItemFlag(ImGuiItemFlags_Disabled, true);
|
UIWidgets::DisableComponent(ImGui::GetStyle().Alpha * 0.5f);
|
||||||
ImGui::PushStyleVar(ImGuiStyleVar_Alpha, ImGui::GetStyle().Alpha * 0.5f);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
UIWidgets::PaddedEnhancementCheckbox("Enable Beta Quest", "gEnableBetaQuest", true, false);
|
UIWidgets::PaddedEnhancementCheckbox("Enable Beta Quest", "gEnableBetaQuest", true, false);
|
||||||
@ -1152,15 +1061,14 @@ namespace GameMenuBar {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!isBetaQuestEnabled) {
|
if (!isBetaQuestEnabled) {
|
||||||
ImGui::PopItemFlag();
|
UIWidgets::ReEnableComponent("");
|
||||||
ImGui::PopStyleVar(1);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ImGui::Button("Change Age")) {
|
if (ImGui::Button("Change Age")) {
|
||||||
CVarSetInteger("gSwitchAge", 1);
|
CVarSetInteger("gSwitchAge", 1);
|
||||||
}
|
}
|
||||||
UIWidgets::Tooltip("Switches links age and reloads the area.");
|
UIWidgets::Tooltip("Switches Link's age and reloads the area.");
|
||||||
|
|
||||||
ImGui::EndMenu();
|
ImGui::EndMenu();
|
||||||
}
|
}
|
||||||
@ -1176,15 +1084,8 @@ namespace GameMenuBar {
|
|||||||
UIWidgets::PaddedEnhancementCheckbox("Fast File Select", "gSkipLogoTitle", true, false);
|
UIWidgets::PaddedEnhancementCheckbox("Fast File Select", "gSkipLogoTitle", true, false);
|
||||||
UIWidgets::Tooltip("Load the game to the selected menu or file\n\"Zelda Map Select\" require debug mode else you will fallback to File choose menu\nUsing a file number that don't have save will create a save file only if you toggle on \"Create a new save if none ?\" else it will bring you to the File choose menu");
|
UIWidgets::Tooltip("Load the game to the selected menu or file\n\"Zelda Map Select\" require debug mode else you will fallback to File choose menu\nUsing a file number that don't have save will create a save file only if you toggle on \"Create a new save if none ?\" else it will bring you to the File choose menu");
|
||||||
if (CVarGetInteger("gSkipLogoTitle", 0)) {
|
if (CVarGetInteger("gSkipLogoTitle", 0)) {
|
||||||
const char* FastFileSelect[5] = {
|
|
||||||
"File N.1",
|
|
||||||
"File N.2",
|
|
||||||
"File N.3",
|
|
||||||
"Zelda Map Select (require OoT Debug Mode)",
|
|
||||||
"File select",
|
|
||||||
};
|
|
||||||
ImGui::Text("Loading :");
|
ImGui::Text("Loading :");
|
||||||
UIWidgets::EnhancementCombobox("gSaveFileID", FastFileSelect, 5, 0);
|
UIWidgets::EnhancementCombobox("gSaveFileID", FastFileSelect, 0);
|
||||||
};
|
};
|
||||||
UIWidgets::PaddedEnhancementCheckbox("Hide Build Info", "gHideBuildInfo", true, false);
|
UIWidgets::PaddedEnhancementCheckbox("Hide Build Info", "gHideBuildInfo", true, false);
|
||||||
UIWidgets::Tooltip("Hides the game version and build details in the boot logo start screen");
|
UIWidgets::Tooltip("Hides the game version and build details in the boot logo start screen");
|
||||||
@ -1272,7 +1173,7 @@ namespace GameMenuBar {
|
|||||||
SohImGui::RequestCvarSaveOnNextTick();
|
SohImGui::RequestCvarSaveOnNextTick();
|
||||||
SohImGui::EnableWindow("Randomizer Settings", CVarGetInteger("gRandomizerSettingsEnabled", 0));
|
SohImGui::EnableWindow("Randomizer Settings", CVarGetInteger("gRandomizerSettingsEnabled", 0));
|
||||||
}
|
}
|
||||||
ImGui::Dummy(ImVec2(0.0f, 0.0f));
|
UIWidgets::Spacer(0);
|
||||||
if (ImGui::Button(GetWindowButtonText("Item Tracker", CVarGetInteger("gItemTrackerEnabled", 0)).c_str(), buttonSize))
|
if (ImGui::Button(GetWindowButtonText("Item Tracker", CVarGetInteger("gItemTrackerEnabled", 0)).c_str(), buttonSize))
|
||||||
{
|
{
|
||||||
bool currentValue = CVarGetInteger("gItemTrackerEnabled", 0);
|
bool currentValue = CVarGetInteger("gItemTrackerEnabled", 0);
|
||||||
@ -1280,7 +1181,7 @@ namespace GameMenuBar {
|
|||||||
SohImGui::RequestCvarSaveOnNextTick();
|
SohImGui::RequestCvarSaveOnNextTick();
|
||||||
SohImGui::EnableWindow("Item Tracker", CVarGetInteger("gItemTrackerEnabled", 0));
|
SohImGui::EnableWindow("Item Tracker", CVarGetInteger("gItemTrackerEnabled", 0));
|
||||||
}
|
}
|
||||||
ImGui::Dummy(ImVec2(0.0f, 0.0f));
|
UIWidgets::Spacer(0);
|
||||||
if (ImGui::Button(GetWindowButtonText("Item Tracker Settings", CVarGetInteger("gItemTrackerSettingsEnabled", 0)).c_str(), buttonSize))
|
if (ImGui::Button(GetWindowButtonText("Item Tracker Settings", CVarGetInteger("gItemTrackerSettingsEnabled", 0)).c_str(), buttonSize))
|
||||||
{
|
{
|
||||||
bool currentValue = CVarGetInteger("gItemTrackerSettingsEnabled", 0);
|
bool currentValue = CVarGetInteger("gItemTrackerSettingsEnabled", 0);
|
||||||
@ -1288,7 +1189,7 @@ namespace GameMenuBar {
|
|||||||
SohImGui::RequestCvarSaveOnNextTick();
|
SohImGui::RequestCvarSaveOnNextTick();
|
||||||
SohImGui::EnableWindow("Item Tracker Settings", CVarGetInteger("gItemTrackerSettingsEnabled", 0));
|
SohImGui::EnableWindow("Item Tracker Settings", CVarGetInteger("gItemTrackerSettingsEnabled", 0));
|
||||||
}
|
}
|
||||||
ImGui::Dummy(ImVec2(0.0f, 0.0f));
|
UIWidgets::Spacer(0);
|
||||||
if (ImGui::Button(GetWindowButtonText("Entrance Tracker", CVarGetInteger("gEntranceTrackerEnabled", 0)).c_str(), buttonSize))
|
if (ImGui::Button(GetWindowButtonText("Entrance Tracker", CVarGetInteger("gEntranceTrackerEnabled", 0)).c_str(), buttonSize))
|
||||||
{
|
{
|
||||||
bool currentValue = CVarGetInteger("gEntranceTrackerEnabled", 0);
|
bool currentValue = CVarGetInteger("gEntranceTrackerEnabled", 0);
|
||||||
@ -1296,7 +1197,7 @@ namespace GameMenuBar {
|
|||||||
SohImGui::RequestCvarSaveOnNextTick();
|
SohImGui::RequestCvarSaveOnNextTick();
|
||||||
SohImGui::EnableWindow("Entrance Tracker", CVarGetInteger("gEntranceTrackerEnabled", 0));
|
SohImGui::EnableWindow("Entrance Tracker", CVarGetInteger("gEntranceTrackerEnabled", 0));
|
||||||
}
|
}
|
||||||
ImGui::Dummy(ImVec2(0.0f, 0.0f));
|
UIWidgets::Spacer(0);
|
||||||
if (ImGui::Button(GetWindowButtonText("Check Tracker", CVarGetInteger("gCheckTrackerEnabled", 0)).c_str(), buttonSize))
|
if (ImGui::Button(GetWindowButtonText("Check Tracker", CVarGetInteger("gCheckTrackerEnabled", 0)).c_str(), buttonSize))
|
||||||
{
|
{
|
||||||
bool currentValue = CVarGetInteger("gCheckTrackerEnabled", 0);
|
bool currentValue = CVarGetInteger("gCheckTrackerEnabled", 0);
|
||||||
@ -1304,7 +1205,7 @@ namespace GameMenuBar {
|
|||||||
SohImGui::RequestCvarSaveOnNextTick();
|
SohImGui::RequestCvarSaveOnNextTick();
|
||||||
SohImGui::EnableWindow("Check Tracker", CVarGetInteger("gCheckTrackerEnabled", 0));
|
SohImGui::EnableWindow("Check Tracker", CVarGetInteger("gCheckTrackerEnabled", 0));
|
||||||
}
|
}
|
||||||
ImGui::Dummy(ImVec2(0.0f, 0.0f));
|
UIWidgets::Spacer(0);
|
||||||
if (ImGui::Button(GetWindowButtonText("Check Tracker Settings", CVarGetInteger("gCheckTrackerSettingsEnabled", 0)).c_str(), buttonSize))
|
if (ImGui::Button(GetWindowButtonText("Check Tracker Settings", CVarGetInteger("gCheckTrackerSettingsEnabled", 0)).c_str(), buttonSize))
|
||||||
{
|
{
|
||||||
bool currentValue = CVarGetInteger("gCheckTrackerSettingsEnabled", 0);
|
bool currentValue = CVarGetInteger("gCheckTrackerSettingsEnabled", 0);
|
||||||
@ -1345,7 +1246,7 @@ namespace GameMenuBar {
|
|||||||
disableKeyColors = false;
|
disableKeyColors = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* disableKeyColorsText =
|
static const char* disableKeyColorsText =
|
||||||
"This setting is disabled because a savefile is loaded without any key\n"
|
"This setting is disabled because a savefile is loaded without any key\n"
|
||||||
"shuffle settings set to \"Any Dungeon\", \"Overworld\" or \"Anywhere\"";
|
"shuffle settings set to \"Any Dungeon\", \"Overworld\" or \"Anywhere\"";
|
||||||
|
|
||||||
@ -1375,7 +1276,7 @@ namespace GameMenuBar {
|
|||||||
CrowdControl::Instance->Disable();
|
CrowdControl::Instance->Disable();
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui::Dummy(ImVec2(0.0f, 0.0f));
|
UIWidgets::Spacer(0);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
UIWidgets::EnhancementCheckbox("Enemy Randomizer", "gRandomizedEnemies");
|
UIWidgets::EnhancementCheckbox("Enemy Randomizer", "gRandomizedEnemies");
|
||||||
@ -1387,7 +1288,7 @@ namespace GameMenuBar {
|
|||||||
if (CVarGetInteger("gRandomizedEnemies", 0)) {
|
if (CVarGetInteger("gRandomizedEnemies", 0)) {
|
||||||
|
|
||||||
bool disableSeededEnemies = !gSaveContext.n64ddFlag && gSaveContext.fileNum >= 0 && gSaveContext.fileNum <= 2;
|
bool disableSeededEnemies = !gSaveContext.n64ddFlag && gSaveContext.fileNum >= 0 && gSaveContext.fileNum <= 2;
|
||||||
const char* disableSeededEnemiesText = "This setting is disabled because it relies on a randomizer savefile.";
|
static const char* disableSeededEnemiesText = "This setting is disabled because it relies on a randomizer savefile.";
|
||||||
|
|
||||||
UIWidgets::PaddedEnhancementCheckbox("Seeded Enemy Spawns", "gSeededRandomizedEnemies", true, false, disableSeededEnemies, disableSeededEnemiesText);
|
UIWidgets::PaddedEnhancementCheckbox("Seeded Enemy Spawns", "gSeededRandomizedEnemies", true, false, disableSeededEnemies, disableSeededEnemiesText);
|
||||||
UIWidgets::Tooltip(
|
UIWidgets::Tooltip(
|
||||||
|
@ -51,22 +51,6 @@ namespace UIWidgets {
|
|||||||
return WrappedText(text.c_str(), charactersPerLine);
|
return WrappedText(text.c_str(), charactersPerLine);
|
||||||
}
|
}
|
||||||
|
|
||||||
void LoadPickersColors(ImVec4& ColorArray, const char* cvarname, const ImVec4& default_colors, bool has_alpha)
|
|
||||||
{
|
|
||||||
Color_RGBA8 defaultColors;
|
|
||||||
defaultColors.r = default_colors.x;
|
|
||||||
defaultColors.g = default_colors.y;
|
|
||||||
defaultColors.b = default_colors.z;
|
|
||||||
defaultColors.a = default_colors.w;
|
|
||||||
|
|
||||||
Color_RGBA8 cvarColor = CVarGetColor(cvarname, defaultColors);
|
|
||||||
|
|
||||||
ColorArray.x = cvarColor.r / 255.0;
|
|
||||||
ColorArray.y = cvarColor.g / 255.0;
|
|
||||||
ColorArray.z = cvarColor.b / 255.0;
|
|
||||||
ColorArray.w = cvarColor.a / 255.0;
|
|
||||||
}
|
|
||||||
|
|
||||||
void SetLastItemHoverText(const std::string& text) {
|
void SetLastItemHoverText(const std::string& text) {
|
||||||
if (ImGui::IsItemHovered()) {
|
if (ImGui::IsItemHovered()) {
|
||||||
ImGui::BeginTooltip();
|
ImGui::BeginTooltip();
|
||||||
@ -118,13 +102,9 @@ namespace UIWidgets {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void PaddedSeparator(bool padTop, bool padBottom, float extraVerticalTopPadding, float extraVerticalBottomPadding) {
|
void PaddedSeparator(bool padTop, bool padBottom, float extraVerticalTopPadding, float extraVerticalBottomPadding) {
|
||||||
if (padTop)
|
if (padTop) Spacer(0);
|
||||||
Spacer(0);
|
|
||||||
|
|
||||||
ImGui::Separator();
|
ImGui::Separator();
|
||||||
|
if (padBottom) Spacer(0);
|
||||||
if (padBottom)
|
|
||||||
Spacer(0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void RenderCross(ImDrawList* draw_list, ImVec2 pos, ImU32 col, float sz) {
|
void RenderCross(ImDrawList* draw_list, ImVec2 pos, ImU32 col, float sz) {
|
||||||
@ -143,8 +123,9 @@ namespace UIWidgets {
|
|||||||
|
|
||||||
bool CustomCheckbox(const char* label, bool* v, bool disabled, CheckboxGraphics disabledGraphic) {
|
bool CustomCheckbox(const char* label, bool* v, bool disabled, CheckboxGraphics disabledGraphic) {
|
||||||
ImGuiWindow* window = ImGui::GetCurrentWindow();
|
ImGuiWindow* window = ImGui::GetCurrentWindow();
|
||||||
if (window->SkipItems)
|
if (window->SkipItems) {
|
||||||
return false;
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
ImGuiContext& g = *GImGui;
|
ImGuiContext& g = *GImGui;
|
||||||
const ImGuiStyle& style = g.Style;
|
const ImGuiStyle& style = g.Style;
|
||||||
@ -187,21 +168,37 @@ namespace UIWidgets {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ImVec2 label_pos = ImVec2(check_bb.Max.x + style.ItemInnerSpacing.x, check_bb.Min.y + style.FramePadding.y);
|
ImVec2 label_pos = ImVec2(check_bb.Max.x + style.ItemInnerSpacing.x, check_bb.Min.y + style.FramePadding.y);
|
||||||
if (g.LogEnabled)
|
if (g.LogEnabled) {
|
||||||
ImGui::LogRenderedText(&label_pos, mixed_value ? "[~]" : *v ? "[x]" : "[ ]");
|
ImGui::LogRenderedText(&label_pos, mixed_value ? "[~]" : *v ? "[x]" : "[ ]");
|
||||||
if (label_size.x > 0.0f)
|
}
|
||||||
|
if (label_size.x > 0.0f) {
|
||||||
ImGui::RenderText(label_pos, label);
|
ImGui::RenderText(label_pos, label);
|
||||||
|
}
|
||||||
|
|
||||||
IMGUI_TEST_ENGINE_ITEM_INFO(id, label, g.LastItemData.StatusFlags | ImGuiItemStatusFlags_Checkable | (*v ? ImGuiItemStatusFlags_Checked : 0));
|
IMGUI_TEST_ENGINE_ITEM_INFO(id, label, g.LastItemData.StatusFlags | ImGuiItemStatusFlags_Checkable | (*v ? ImGuiItemStatusFlags_Checked : 0));
|
||||||
return pressed;
|
return pressed;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ReEnableComponent(const char* disabledTooltipText) {
|
||||||
|
// End of disable region of previous component
|
||||||
|
ImGui::PopStyleVar(1);
|
||||||
|
if (ImGui::IsItemHovered(ImGuiHoveredFlags_AllowWhenDisabled) && strcmp(disabledTooltipText, "") != 0) {
|
||||||
|
ImGui::SetTooltip("%s", disabledTooltipText);
|
||||||
|
}
|
||||||
|
ImGui::PopItemFlag();
|
||||||
|
}
|
||||||
|
|
||||||
|
void DisableComponent(const float alpha) {
|
||||||
|
ImGui::PushItemFlag(ImGuiItemFlags_Disabled, true);
|
||||||
|
ImGui::PushStyleVar(ImGuiStyleVar_Alpha, alpha);
|
||||||
|
}
|
||||||
|
|
||||||
bool EnhancementCheckbox(const char* text, const char* cvarName, bool disabled, const char* disabledTooltipText, CheckboxGraphics disabledGraphic, bool defaultValue) {
|
bool EnhancementCheckbox(const char* text, const char* cvarName, bool disabled, const char* disabledTooltipText, CheckboxGraphics disabledGraphic, bool defaultValue) {
|
||||||
bool changed = false;
|
bool changed = false;
|
||||||
if (disabled) {
|
if (disabled) {
|
||||||
ImGui::PushItemFlag(ImGuiItemFlags_Disabled, true);
|
DisableComponent(ImGui::GetStyle().Alpha * 0.5f);
|
||||||
ImGui::PushStyleVar(ImGuiStyleVar_Alpha, ImGui::GetStyle().Alpha * 0.5f);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool val = (bool)CVarGetInteger(cvarName, defaultValue);
|
bool val = (bool)CVarGetInteger(cvarName, defaultValue);
|
||||||
if (CustomCheckbox(text, &val, disabled, disabledGraphic)) {
|
if (CustomCheckbox(text, &val, disabled, disabledGraphic)) {
|
||||||
CVarSetInteger(cvarName, val);
|
CVarSetInteger(cvarName, val);
|
||||||
@ -210,60 +207,39 @@ namespace UIWidgets {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (disabled) {
|
if (disabled) {
|
||||||
ImGui::PopStyleVar(1);
|
ReEnableComponent(disabledTooltipText);
|
||||||
if (ImGui::IsItemHovered(ImGuiHoveredFlags_AllowWhenDisabled) && strcmp(disabledTooltipText, "") != 0) {
|
|
||||||
ImGui::SetTooltip("%s", disabledTooltipText);
|
|
||||||
}
|
|
||||||
ImGui::PopItemFlag();
|
|
||||||
}
|
}
|
||||||
return changed;
|
return changed;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool PaddedEnhancementCheckbox(const char* text, const char* cvarName, bool padTop, bool padBottom, bool disabled, const char* disabledTooltipText, CheckboxGraphics disabledGraphic, bool defaultValue) {
|
bool PaddedEnhancementCheckbox(const char* text, const char* cvarName, bool padTop, bool padBottom, bool disabled, const char* disabledTooltipText, CheckboxGraphics disabledGraphic, bool defaultValue) {
|
||||||
bool changed = false;
|
ImGui::BeginGroup();
|
||||||
if (padTop) Spacer(0);
|
if (padTop) Spacer(0);
|
||||||
|
|
||||||
if (EnhancementCheckbox(text, cvarName, disabled, disabledTooltipText, disabledGraphic, defaultValue)) {
|
bool changed = EnhancementCheckbox(text, cvarName, disabled, disabledTooltipText, disabledGraphic, defaultValue);
|
||||||
changed = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (padBottom) Spacer(0);
|
if (padBottom) Spacer(0);
|
||||||
|
ImGui::EndGroup();
|
||||||
return changed;
|
return changed;
|
||||||
}
|
}
|
||||||
|
|
||||||
void EnhancementCombo(const std::string& name, const char* cvarName, const std::vector<std::string>& items, int defaultValue) {
|
bool EnhancementCombobox(const char* cvarName, std::span<const char*, std::dynamic_extent> comboArray, uint8_t defaultIndex, bool disabled, const char* disabledTooltipText, uint8_t disabledValue) {
|
||||||
if (ImGui::BeginCombo(name.c_str(), items[static_cast<int>(CVarGetInteger(cvarName, defaultValue))].c_str())) {
|
|
||||||
for (int settingIndex = 0; settingIndex < (int) items.size(); settingIndex++) {
|
|
||||||
if (ImGui::Selectable(items[settingIndex].c_str())) {
|
|
||||||
CVarSetInteger(cvarName, settingIndex);
|
|
||||||
SohImGui::RequestCvarSaveOnNextTick();
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
ImGui::EndCombo();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
bool EnhancementCombobox(const char* name, const char* ComboArray[], size_t arraySize, uint8_t FirstTimeValue, bool disabled, const char* disabledTooltipText, uint8_t disabledValue) {
|
|
||||||
bool changed = false;
|
bool changed = false;
|
||||||
if (FirstTimeValue <= 0) {
|
if (defaultIndex <= 0) {
|
||||||
FirstTimeValue = 0;
|
defaultIndex = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (disabled) {
|
if (disabled) {
|
||||||
ImGui::PushItemFlag(ImGuiItemFlags_Disabled, true);
|
DisableComponent(ImGui::GetStyle().Alpha * 0.5f);
|
||||||
ImGui::PushStyleVar(ImGuiStyleVar_Alpha, ImGui::GetStyle().Alpha * 0.5f);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t selected = CVarGetInteger(name, FirstTimeValue);
|
uint8_t selected = CVarGetInteger(cvarName, defaultIndex);
|
||||||
uint8_t DefaultValue = selected;
|
std::string comboName = std::string("##") + std::string(cvarName);
|
||||||
std::string comboName = std::string("##") + std::string(name);
|
if (ImGui::BeginCombo(comboName.c_str(), comboArray[selected])) {
|
||||||
if (ImGui::BeginCombo(comboName.c_str(), ComboArray[DefaultValue])) {
|
for (uint8_t i = 0; i < comboArray.size(); i++) {
|
||||||
for (uint8_t i = 0; i < arraySize; i++) {
|
if (strlen(comboArray[i]) > 1) {
|
||||||
if (strlen(ComboArray[i]) > 1) {
|
if (ImGui::Selectable(comboArray[i], i == selected)) {
|
||||||
if (ImGui::Selectable(ComboArray[i], i == selected)) {
|
CVarSetInteger(cvarName, i);
|
||||||
CVarSetInteger(name, i);
|
|
||||||
selected = i;
|
selected = i;
|
||||||
changed = true;
|
changed = true;
|
||||||
SohImGui::RequestCvarSaveOnNextTick();
|
SohImGui::RequestCvarSaveOnNextTick();
|
||||||
@ -274,14 +250,10 @@ namespace UIWidgets {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (disabled) {
|
if (disabled) {
|
||||||
ImGui::PopStyleVar(1);
|
ReEnableComponent(disabledTooltipText);
|
||||||
if (ImGui::IsItemHovered(ImGuiHoveredFlags_AllowWhenDisabled) && strcmp(disabledTooltipText, "") != 0) {
|
|
||||||
ImGui::SetTooltip("%s", disabledTooltipText);
|
|
||||||
}
|
|
||||||
ImGui::PopItemFlag();
|
|
||||||
|
|
||||||
if (disabledValue >= 0 && selected != disabledValue) {
|
if (disabledValue >= 0 && selected != disabledValue) {
|
||||||
CVarSetInteger(name, disabledValue);
|
CVarSetInteger(cvarName, disabledValue);
|
||||||
changed = true;
|
changed = true;
|
||||||
SohImGui::RequestCvarSaveOnNextTick();
|
SohImGui::RequestCvarSaveOnNextTick();
|
||||||
}
|
}
|
||||||
@ -290,120 +262,89 @@ namespace UIWidgets {
|
|||||||
return changed;
|
return changed;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool LabeledRightAlignedEnhancementCombobox(const char* label, const char* cvarName, std::span<const char*, std::dynamic_extent> comboArray, uint8_t defaultIndex, bool disabled, const char* disabledTooltipText, uint8_t disabledValue) {
|
||||||
|
ImGui::Text(label);
|
||||||
|
s32 currentValue = CVarGetInteger(cvarName, defaultIndex);
|
||||||
|
|
||||||
|
#ifdef __WIIU__
|
||||||
|
ImGui::SameLine(ImGui::GetContentRegionAvail().x - (ImGui::CalcTextSize(comboArray[currentValue]).x + 40.0f));
|
||||||
|
ImGui::PushItemWidth(ImGui::CalcTextSize(comboArray[currentValue]).x + 60.0f);
|
||||||
|
#else
|
||||||
|
ImGui::SameLine(ImGui::GetContentRegionAvail().x - (ImGui::CalcTextSize(comboArray[currentValue]).x + 20.0f));
|
||||||
|
ImGui::PushItemWidth(ImGui::CalcTextSize(comboArray[currentValue]).x + 30.0f);
|
||||||
|
#endif
|
||||||
|
|
||||||
|
bool changed = EnhancementCombobox(cvarName, comboArray, defaultIndex, disabled, disabledTooltipText, disabledValue);
|
||||||
|
|
||||||
|
ImGui::PopItemWidth();
|
||||||
|
return changed;
|
||||||
|
}
|
||||||
|
|
||||||
void PaddedText(const char* text, bool padTop, bool padBottom) {
|
void PaddedText(const char* text, bool padTop, bool padBottom) {
|
||||||
if (padTop)
|
if (padTop) Spacer(0);
|
||||||
Spacer(0);
|
|
||||||
|
|
||||||
ImGui::Text("%s", text);
|
ImGui::Text("%s", text);
|
||||||
|
|
||||||
if (padBottom)
|
if (padBottom) Spacer(0);
|
||||||
Spacer(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
void DisableComponentSwitch(const char* disabledTooltipText, const float alpha) {
|
|
||||||
// End of disable region of previous component
|
|
||||||
ImGui::PopStyleVar(1);
|
|
||||||
if (ImGui::IsItemHovered(ImGuiHoveredFlags_AllowWhenDisabled) && strcmp(disabledTooltipText, "") != 0) {
|
|
||||||
ImGui::SetTooltip("%s", disabledTooltipText);
|
|
||||||
}
|
|
||||||
ImGui::PopItemFlag();
|
|
||||||
|
|
||||||
// Start of disable region of next component
|
|
||||||
ImGui::PushItemFlag(ImGuiItemFlags_Disabled, true);
|
|
||||||
ImGui::PushStyleVar(ImGuiStyleVar_Alpha, alpha);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
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 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;
|
bool changed = false;
|
||||||
int val = CVarGetInteger(cvarName, defaultValue);
|
int val = CVarGetInteger(cvarName, defaultValue);
|
||||||
|
|
||||||
float alpha;
|
|
||||||
if (disabled) {
|
if (disabled) {
|
||||||
alpha = ImGui::GetStyle().Alpha * 0.5f;
|
DisableComponent(ImGui::GetStyle().Alpha * 0.5f);
|
||||||
ImGui::PushItemFlag(ImGuiItemFlags_Disabled, true);
|
|
||||||
ImGui::PushStyleVar(ImGuiStyleVar_Alpha, alpha);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui::Text(text, val);
|
ImGui::Text(text, val);
|
||||||
Spacer(0);
|
Spacer(0);
|
||||||
|
|
||||||
if (disabled) {
|
ImGui::BeginGroup();
|
||||||
DisableComponentSwitch(disabledTooltipText, alpha);
|
if (PlusMinusButton) {
|
||||||
}
|
std::string MinusBTNName = " - ##" + std::string(cvarName);
|
||||||
|
|
||||||
if(PlusMinusButton) {
|
|
||||||
std::string MinusBTNName = " - ##";
|
|
||||||
MinusBTNName += cvarName;
|
|
||||||
if (ImGui::Button(MinusBTNName.c_str())) {
|
if (ImGui::Button(MinusBTNName.c_str())) {
|
||||||
val--;
|
val--;
|
||||||
CVarSetInteger(cvarName, val);
|
|
||||||
SohImGui::RequestCvarSaveOnNextTick();
|
|
||||||
changed = true;
|
changed = true;
|
||||||
}
|
}
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
ImGui::SetCursorPosX(ImGui::GetCursorPosX() - 7.0f);
|
ImGui::SetCursorPosX(ImGui::GetCursorPosX() - 7.0f);
|
||||||
|
}
|
||||||
|
|
||||||
if (disabled) {
|
ImGui::PushItemWidth(std::min((ImGui::GetContentRegionAvail().x - (PlusMinusButton ? sliderButtonWidth : 0.0f)), maxSliderWidth));
|
||||||
DisableComponentSwitch(disabledTooltipText, alpha);
|
if (ImGui::SliderInt(id, &val, min, max, format, ImGuiSliderFlags_AlwaysClamp))
|
||||||
}
|
|
||||||
}
|
|
||||||
if (PlusMinusButton) {
|
|
||||||
#ifdef __SWITCH__
|
|
||||||
ImGui::PushItemWidth(ImGui::GetWindowSize().x - 110.0f);
|
|
||||||
#elif defined(__WIIU__)
|
|
||||||
ImGui::PushItemWidth(ImGui::GetWindowSize().x - 79.0f * 2);
|
|
||||||
#else
|
|
||||||
ImGui::PushItemWidth(ImGui::GetWindowSize().x - 79.0f);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
if (ImGui::SliderInt(id, &val, min, max, format))
|
|
||||||
{
|
{
|
||||||
CVarSetInteger(cvarName, val);
|
|
||||||
SohImGui::RequestCvarSaveOnNextTick();
|
|
||||||
changed = true;
|
changed = true;
|
||||||
}
|
}
|
||||||
if (PlusMinusButton) {
|
ImGui::PopItemWidth();
|
||||||
ImGui::PopItemWidth();
|
|
||||||
}
|
|
||||||
if(PlusMinusButton) {
|
|
||||||
if (disabled) {
|
|
||||||
DisableComponentSwitch(disabledTooltipText, alpha);
|
|
||||||
}
|
|
||||||
|
|
||||||
std::string PlusBTNName = " + ##";
|
if (PlusMinusButton) {
|
||||||
PlusBTNName += cvarName;
|
std::string PlusBTNName = " + ##" + std::string(cvarName);
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
ImGui::SetCursorPosX(ImGui::GetCursorPosX() - 7.0f);
|
ImGui::SetCursorPosX(ImGui::GetCursorPosX() - 7.0f);
|
||||||
if (ImGui::Button(PlusBTNName.c_str())) {
|
if (ImGui::Button(PlusBTNName.c_str())) {
|
||||||
val++;
|
val++;
|
||||||
CVarSetInteger(cvarName, val);
|
|
||||||
SohImGui::RequestCvarSaveOnNextTick();
|
|
||||||
changed = true;
|
changed = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
ImGui::EndGroup();
|
||||||
|
|
||||||
if (disabled) {
|
if (disabled) {
|
||||||
ImGui::PopStyleVar(1);
|
ReEnableComponent(disabledTooltipText);
|
||||||
if (ImGui::IsItemHovered(ImGuiHoveredFlags_AllowWhenDisabled) && strcmp(disabledTooltipText, "") != 0) {
|
|
||||||
ImGui::SetTooltip("%s", disabledTooltipText);
|
|
||||||
}
|
|
||||||
ImGui::PopItemFlag();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (val < min)
|
if (val < min) {
|
||||||
{
|
|
||||||
val = min;
|
val = min;
|
||||||
CVarSetInteger(cvarName, val);
|
|
||||||
SohImGui::RequestCvarSaveOnNextTick();
|
|
||||||
changed = true;
|
changed = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (val > max)
|
if (val > max) {
|
||||||
{
|
|
||||||
val = max;
|
val = max;
|
||||||
|
changed = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (changed) {
|
||||||
CVarSetInteger(cvarName, val);
|
CVarSetInteger(cvarName, val);
|
||||||
SohImGui::RequestCvarSaveOnNextTick();
|
SohImGui::RequestCvarSaveOnNextTick();
|
||||||
changed = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return changed;
|
return changed;
|
||||||
@ -414,8 +355,7 @@ namespace UIWidgets {
|
|||||||
float val = CVarGetFloat(cvarName, defaultValue);
|
float val = CVarGetFloat(cvarName, defaultValue);
|
||||||
|
|
||||||
if (disabled) {
|
if (disabled) {
|
||||||
ImGui::PushItemFlag(ImGuiItemFlags_Disabled, true);
|
DisableComponent(ImGui::GetStyle().Alpha * 0.5f);
|
||||||
ImGui::PushStyleVar(ImGuiStyleVar_Alpha, ImGui::GetStyle().Alpha * 0.5f);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isPercentage) {
|
if (!isPercentage) {
|
||||||
@ -424,93 +364,90 @@ namespace UIWidgets {
|
|||||||
ImGui::Text(text, static_cast<int>(100 * val));
|
ImGui::Text(text, static_cast<int>(100 * val));
|
||||||
}
|
}
|
||||||
Spacer(0);
|
Spacer(0);
|
||||||
if(PlusMinusButton) {
|
|
||||||
std::string MinusBTNName = " - ##";
|
ImGui::BeginGroup();
|
||||||
MinusBTNName += cvarName;
|
if (PlusMinusButton) {
|
||||||
|
std::string MinusBTNName = " - ##" + std::string(cvarName);
|
||||||
if (ImGui::Button(MinusBTNName.c_str())) {
|
if (ImGui::Button(MinusBTNName.c_str())) {
|
||||||
if (!isPercentage) {
|
if (isPercentage) {
|
||||||
val -= 0.1f;
|
|
||||||
} else {
|
|
||||||
val -= 0.01f;
|
val -= 0.01f;
|
||||||
|
} else {
|
||||||
|
val -= 0.1f;
|
||||||
}
|
}
|
||||||
CVarSetFloat(cvarName, val);
|
|
||||||
SohImGui::RequestCvarSaveOnNextTick();
|
|
||||||
changed = true;
|
changed = true;
|
||||||
}
|
}
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
ImGui::SetCursorPosX(ImGui::GetCursorPosX() - 7.0f);
|
ImGui::SetCursorPosX(ImGui::GetCursorPosX() - 7.0f);
|
||||||
}
|
}
|
||||||
if (PlusMinusButton) {
|
|
||||||
#ifdef __SWITCH__
|
ImGui::PushItemWidth(std::min((ImGui::GetContentRegionAvail().x - (PlusMinusButton ? sliderButtonWidth : 0.0f)), maxSliderWidth));
|
||||||
ImGui::PushItemWidth(ImGui::GetWindowSize().x - 110.0f);
|
if (ImGui::SliderFloat(id, &val, min, max, format, ImGuiSliderFlags_AlwaysClamp)) {
|
||||||
#elif defined(__WIIU__)
|
|
||||||
ImGui::PushItemWidth(ImGui::GetWindowSize().x - 79.0f * 2);
|
|
||||||
#else
|
|
||||||
ImGui::PushItemWidth(ImGui::GetWindowSize().x - 79.0f);
|
|
||||||
#endif
|
|
||||||
}
|
|
||||||
if (ImGui::SliderFloat(id, &val, min, max, format)) {
|
|
||||||
if (isPercentage) {
|
if (isPercentage) {
|
||||||
CVarSetFloat(cvarName, roundf(val * 100) / 100);
|
val = roundf(val * 100) / 100;
|
||||||
} else {
|
|
||||||
CVarSetFloat(cvarName, val);
|
|
||||||
}
|
}
|
||||||
SohImGui::RequestCvarSaveOnNextTick();
|
|
||||||
changed = true;
|
changed = true;
|
||||||
}
|
}
|
||||||
|
ImGui::PopItemWidth();
|
||||||
|
|
||||||
if (PlusMinusButton) {
|
if (PlusMinusButton) {
|
||||||
ImGui::PopItemWidth();
|
std::string PlusBTNName = " + ##" + std::string(cvarName);
|
||||||
}
|
|
||||||
if(PlusMinusButton) {
|
|
||||||
std::string PlusBTNName = " + ##";
|
|
||||||
PlusBTNName += cvarName;
|
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
ImGui::SetCursorPosX(ImGui::GetCursorPosX() - 7.0f);
|
ImGui::SetCursorPosX(ImGui::GetCursorPosX() - 7.0f);
|
||||||
if (ImGui::Button(PlusBTNName.c_str())) {
|
if (ImGui::Button(PlusBTNName.c_str())) {
|
||||||
if (!isPercentage) {
|
if (isPercentage) {
|
||||||
val += 0.1f;
|
|
||||||
} else {
|
|
||||||
val += 0.01f;
|
val += 0.01f;
|
||||||
|
} else {
|
||||||
|
val += 0.1f;
|
||||||
}
|
}
|
||||||
CVarSetFloat(cvarName, val);
|
|
||||||
SohImGui::RequestCvarSaveOnNextTick();
|
|
||||||
changed = true;
|
changed = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
ImGui::EndGroup();
|
||||||
|
|
||||||
if (disabled) {
|
if (disabled) {
|
||||||
ImGui::PopStyleVar(1);
|
ReEnableComponent(disabledTooltipText);
|
||||||
if (ImGui::IsItemHovered(ImGuiHoveredFlags_AllowWhenDisabled) && strcmp(disabledTooltipText, "") != 0) {
|
|
||||||
ImGui::SetTooltip("%s", disabledTooltipText);
|
|
||||||
}
|
|
||||||
ImGui::PopItemFlag();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (val < min) {
|
if (val < min) {
|
||||||
val = min;
|
val = min;
|
||||||
CVarSetFloat(cvarName, val);
|
|
||||||
SohImGui::RequestCvarSaveOnNextTick();
|
|
||||||
changed = true;
|
changed = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (val > max) {
|
if (val > max) {
|
||||||
val = max;
|
val = max;
|
||||||
|
changed = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (changed) {
|
||||||
CVarSetFloat(cvarName, val);
|
CVarSetFloat(cvarName, val);
|
||||||
SohImGui::RequestCvarSaveOnNextTick();
|
SohImGui::RequestCvarSaveOnNextTick();
|
||||||
changed = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return changed;
|
return changed;
|
||||||
}
|
}
|
||||||
|
|
||||||
void PaddedEnhancementSliderInt(const char* text, const char* id, const char* cvarName, int min, int max, const char* format, int defaultValue, bool PlusMinusButton, bool padTop, bool padBottom, bool disabled, const char* disabledTooltipText) {
|
bool PaddedEnhancementSliderInt(const char* text, const char* id, const char* cvarName, int min, int max, const char* format, int defaultValue, bool PlusMinusButton, bool padTop, bool padBottom, bool disabled, const char* disabledTooltipText) {
|
||||||
if (padTop)
|
bool changed = false;
|
||||||
Spacer(0);
|
ImGui::BeginGroup();
|
||||||
|
if (padTop) Spacer(0);
|
||||||
|
|
||||||
EnhancementSliderInt(text, id, cvarName, min, max, format, defaultValue, PlusMinusButton, disabled, disabledTooltipText);
|
changed = EnhancementSliderInt(text, id, cvarName, min, max, format, defaultValue, PlusMinusButton, disabled, disabledTooltipText);
|
||||||
|
|
||||||
if (padBottom)
|
if (padBottom) Spacer(0);
|
||||||
Spacer(0);
|
ImGui::EndGroup();
|
||||||
|
return changed;
|
||||||
|
}
|
||||||
|
|
||||||
|
bool PaddedEnhancementSliderFloat(const char* text, const char* id, const char* cvarName, float min, float max, const char* format, float defaultValue, bool isPercentage, bool PlusMinusButton, bool padTop, bool padBottom, bool disabled, const char* disabledTooltipText) {
|
||||||
|
bool changed = false;
|
||||||
|
ImGui::BeginGroup();
|
||||||
|
if (padTop) Spacer(0);
|
||||||
|
|
||||||
|
changed = EnhancementSliderFloat(text, id, cvarName, min, max, format, defaultValue, isPercentage, PlusMinusButton, disabled, disabledTooltipText);
|
||||||
|
|
||||||
|
if (padBottom) Spacer(0);
|
||||||
|
ImGui::EndGroup();
|
||||||
|
return changed;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool EnhancementRadioButton(const char* text, const char* cvarName, int id) {
|
bool EnhancementRadioButton(const char* text, const char* cvarName, int id) {
|
||||||
@ -524,9 +461,7 @@ namespace UIWidgets {
|
|||||||
EnhancementRadioButton("German", "gLanguages", LANGUAGE_GER);
|
EnhancementRadioButton("German", "gLanguages", LANGUAGE_GER);
|
||||||
EnhancementRadioButton("French", "gLanguages", LANGUAGE_FRA);
|
EnhancementRadioButton("French", "gLanguages", LANGUAGE_FRA);
|
||||||
*/
|
*/
|
||||||
std::string make_invisible = "##";
|
std::string make_invisible = "##" + std::string(text) + std::string(cvarName);
|
||||||
make_invisible += text;
|
|
||||||
make_invisible += cvarName;
|
|
||||||
|
|
||||||
bool ret = false;
|
bool ret = false;
|
||||||
int val = CVarGetInteger(cvarName, 0);
|
int val = CVarGetInteger(cvarName, 0);
|
||||||
@ -543,12 +478,8 @@ namespace UIWidgets {
|
|||||||
|
|
||||||
bool DrawResetColorButton(const char* cvarName, ImVec4* colors, ImVec4 defaultcolors, bool has_alpha) {
|
bool DrawResetColorButton(const char* cvarName, ImVec4* colors, ImVec4 defaultcolors, bool has_alpha) {
|
||||||
bool changed = false;
|
bool changed = false;
|
||||||
std::string Cvar_RBM = cvarName;
|
std::string Cvar_RBM = std::string(cvarName) + "RBM";
|
||||||
Cvar_RBM += "RBM";
|
std::string MakeInvisible = "Reset##" + std::string(cvarName) + "Reset";
|
||||||
std::string MakeInvisible = "Reset";
|
|
||||||
MakeInvisible += "##";
|
|
||||||
MakeInvisible += cvarName;
|
|
||||||
MakeInvisible += "Reset";
|
|
||||||
if (ImGui::Button(MakeInvisible.c_str())) {
|
if (ImGui::Button(MakeInvisible.c_str())) {
|
||||||
colors->x = defaultcolors.x;
|
colors->x = defaultcolors.x;
|
||||||
colors->y = defaultcolors.y;
|
colors->y = defaultcolors.y;
|
||||||
@ -573,13 +504,8 @@ namespace UIWidgets {
|
|||||||
bool DrawRandomizeColorButton(const char* cvarName, ImVec4* colors) {
|
bool DrawRandomizeColorButton(const char* cvarName, ImVec4* colors) {
|
||||||
bool changed = false;
|
bool changed = false;
|
||||||
Color_RGBA8 NewColors = {0,0,0,255};
|
Color_RGBA8 NewColors = {0,0,0,255};
|
||||||
std::string Cvar_RBM = cvarName;
|
std::string Cvar_RBM = std::string(cvarName) + "RBM";
|
||||||
Cvar_RBM += "RBM";
|
std::string FullName = "Random##" + std::string(cvarName) + "Random";
|
||||||
std::string MakeInvisible = "##";
|
|
||||||
MakeInvisible += cvarName;
|
|
||||||
MakeInvisible += "Random";
|
|
||||||
std::string FullName = "Random";
|
|
||||||
FullName += MakeInvisible;
|
|
||||||
if (ImGui::Button(FullName.c_str())) {
|
if (ImGui::Button(FullName.c_str())) {
|
||||||
#if defined(__SWITCH__) || defined(__WIIU__)
|
#if defined(__SWITCH__) || defined(__WIIU__)
|
||||||
srand(time(NULL));
|
srand(time(NULL));
|
||||||
@ -601,8 +527,7 @@ namespace UIWidgets {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void DrawLockColorCheckbox(const char* cvarName) {
|
void DrawLockColorCheckbox(const char* cvarName) {
|
||||||
std::string Cvar_Lock = cvarName;
|
std::string Cvar_Lock = std::string(cvarName) + "Lock";
|
||||||
Cvar_Lock += "Lock";
|
|
||||||
s32 lock = CVarGetInteger(Cvar_Lock.c_str(), 0);
|
s32 lock = CVarGetInteger(Cvar_Lock.c_str(), 0);
|
||||||
std::string FullName = "Lock##" + Cvar_Lock;
|
std::string FullName = "Lock##" + Cvar_Lock;
|
||||||
EnhancementCheckbox(FullName.c_str(), Cvar_Lock.c_str());
|
EnhancementCheckbox(FullName.c_str(), Cvar_Lock.c_str());
|
||||||
@ -610,17 +535,28 @@ namespace UIWidgets {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void RainbowColor(const char* cvarName, ImVec4* colors) {
|
void RainbowColor(const char* cvarName, ImVec4* colors) {
|
||||||
std::string Cvar_RBM = cvarName;
|
std::string Cvar_RBM = std::string(cvarName) + "RBM";
|
||||||
Cvar_RBM += "RBM";
|
std::string MakeInvisible = "Rainbow##" + std::string(cvarName) + "Rainbow";
|
||||||
std::string MakeInvisible = "Rainbow";
|
|
||||||
MakeInvisible += "##";
|
|
||||||
MakeInvisible += cvarName;
|
|
||||||
MakeInvisible += "Rainbow";
|
|
||||||
|
|
||||||
EnhancementCheckbox(MakeInvisible.c_str(), Cvar_RBM.c_str());
|
EnhancementCheckbox(MakeInvisible.c_str(), Cvar_RBM.c_str());
|
||||||
Tooltip("Cycles through colors on a timer\nOverwrites previously chosen color");
|
Tooltip("Cycles through colors on a timer\nOverwrites previously chosen color");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void LoadPickersColors(ImVec4& ColorArray, const char* cvarname, const ImVec4& default_colors, bool has_alpha) {
|
||||||
|
Color_RGBA8 defaultColors;
|
||||||
|
defaultColors.r = default_colors.x;
|
||||||
|
defaultColors.g = default_colors.y;
|
||||||
|
defaultColors.b = default_colors.z;
|
||||||
|
defaultColors.a = default_colors.w;
|
||||||
|
|
||||||
|
Color_RGBA8 cvarColor = CVarGetColor(cvarname, defaultColors);
|
||||||
|
|
||||||
|
ColorArray.x = cvarColor.r / 255.0;
|
||||||
|
ColorArray.y = cvarColor.g / 255.0;
|
||||||
|
ColorArray.z = cvarColor.b / 255.0;
|
||||||
|
ColorArray.w = cvarColor.a / 255.0;
|
||||||
|
}
|
||||||
|
|
||||||
bool EnhancementColor(const char* text, const char* cvarName, ImVec4 ColorRGBA, ImVec4 default_colors, bool allow_rainbow, bool has_alpha, bool TitleSameLine) {
|
bool EnhancementColor(const char* text, const char* cvarName, ImVec4 ColorRGBA, ImVec4 default_colors, bool allow_rainbow, bool has_alpha, bool TitleSameLine) {
|
||||||
bool changed = false;
|
bool changed = false;
|
||||||
LoadPickersColors(ColorRGBA, cvarName, default_colors, has_alpha);
|
LoadPickersColors(ColorRGBA, cvarName, default_colors, has_alpha);
|
||||||
|
@ -10,6 +10,7 @@
|
|||||||
|
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
#include <span>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <ImGui/imgui.h>
|
#include <ImGui/imgui.h>
|
||||||
|
|
||||||
@ -40,6 +41,14 @@ namespace UIWidgets {
|
|||||||
Checkmark,
|
Checkmark,
|
||||||
None
|
None
|
||||||
};
|
};
|
||||||
|
constexpr float maxSliderWidth = 260.0f;
|
||||||
|
#ifdef __SWITCH__
|
||||||
|
constexpr float sliderButtonWidth = 42.0f;
|
||||||
|
#elif defined(__WIIU__)
|
||||||
|
constexpr float sliderButtonWidth = 60.0f;
|
||||||
|
#else
|
||||||
|
constexpr float sliderButtonWidth = 30.0f;
|
||||||
|
#endif
|
||||||
|
|
||||||
char* WrappedText(const char* text, unsigned int charactersPerLine = 60);
|
char* WrappedText(const char* text, unsigned int charactersPerLine = 60);
|
||||||
char* WrappedText(const std::string& text, unsigned int charactersPerLine);
|
char* WrappedText(const std::string& text, unsigned int charactersPerLine);
|
||||||
@ -52,19 +61,37 @@ namespace UIWidgets {
|
|||||||
|
|
||||||
void Tooltip(const char* text);
|
void Tooltip(const char* text);
|
||||||
void Spacer(float height);
|
void Spacer(float height);
|
||||||
|
|
||||||
void PaddedSeparator(bool padTop = true, bool padBottom = true, float extraVerticalTopPadding = 0.0f, float extraVerticalBottomPadding = 0.0f);
|
void PaddedSeparator(bool padTop = true, bool padBottom = true, float extraVerticalTopPadding = 0.0f, float extraVerticalBottomPadding = 0.0f);
|
||||||
|
|
||||||
|
void RenderCross(ImDrawList* draw_list, ImVec2 pos, ImU32 col, float sz);
|
||||||
|
bool CustomCheckbox(const char* label, bool* v, bool disabled, CheckboxGraphics disabledGraphic);
|
||||||
|
|
||||||
|
void ReEnableComponent(const char* disabledTooltipText);
|
||||||
|
void DisableComponent(const float alpha);
|
||||||
|
|
||||||
bool EnhancementCheckbox(const char* text, const char* cvarName, bool disabled = false, const char* disabledTooltipText = "", CheckboxGraphics disabledGraphic = CheckboxGraphics::Cross, bool defaultValue = false);
|
bool EnhancementCheckbox(const char* text, const char* cvarName, bool disabled = false, const char* disabledTooltipText = "", CheckboxGraphics disabledGraphic = CheckboxGraphics::Cross, bool defaultValue = false);
|
||||||
bool PaddedEnhancementCheckbox(const char* text, const char* cvarName, bool padTop = true, bool padBottom = true, bool disabled = false, const char* disabledTooltipText = "", CheckboxGraphics disabledGraphic = CheckboxGraphics::Cross, bool defaultValue = false);
|
bool PaddedEnhancementCheckbox(const char* text, const char* cvarName, bool padTop = true, bool padBottom = true, bool disabled = false, const char* disabledTooltipText = "", CheckboxGraphics disabledGraphic = CheckboxGraphics::Cross, bool defaultValue = false);
|
||||||
void EnhancementCombo(const std::string& name, const char* cvarName, const std::vector<std::string>& items, int defaultValue = 0);
|
|
||||||
bool EnhancementCombobox(const char* name, const char* ComboArray[], size_t arraySize, uint8_t FirstTimeValue, bool disabled = false, const char* disabledTooltipText = "", uint8_t disabledValue = -1);
|
bool EnhancementCombobox(const char* cvarName, std::span<const char*, std::dynamic_extent> comboArray, uint8_t defaultIndex, bool disabled = false, const char* disabledTooltipText = "", uint8_t disabledValue = -1);
|
||||||
|
bool LabeledRightAlignedEnhancementCombobox(const char* label, const char* cvarName, std::span<const char*, std::dynamic_extent> comboArray, uint8_t defaultIndex, bool disabled = false, const char* disabledTooltipText = "", uint8_t disabledValue = -1);
|
||||||
|
|
||||||
void PaddedText(const char* text, bool padTop = true, bool padBottom = true);
|
void PaddedText(const char* text, bool padTop = true, bool padBottom = true);
|
||||||
bool EnhancementSliderInt(const char* text, const char* id, const char* cvarName, int min, int max, const char* format, int defaultValue = 0, bool PlusMinusButton = false, bool disabled = false, const char* disabledTooltipText = "");
|
|
||||||
void PaddedEnhancementSliderInt(const char* text, const char* id, const char* cvarName, int min, int max, const char* format, int defaultValue = 0, bool PlusMinusButton = false, bool padTop = true, bool padBottom = true, bool disabled = false, const char* disabledTooltipText = "");
|
bool EnhancementSliderInt(const char* text, const char* id, const char* cvarName, int min, int max, const char* format, int defaultValue = 0, bool PlusMinusButton = true, bool disabled = false, const char* disabledTooltipText = "");
|
||||||
bool EnhancementSliderFloat(const char* text, const char* id, const char* cvarName, float min, float max, const char* format, float defaultValue, bool isPercentage, bool PlusMinusButton = false, bool disabled = false, const char* disabledTooltipText = "");
|
bool PaddedEnhancementSliderInt(const char* text, const char* id, const char* cvarName, int min, int max, const char* format, int defaultValue = 0, bool PlusMinusButton = true, bool padTop = true, bool padBottom = true, bool disabled = false, const char* disabledTooltipText = "");
|
||||||
|
bool EnhancementSliderFloat(const char* text, const char* id, const char* cvarName, float min, float max, const char* format, float defaultValue, bool isPercentage, bool PlusMinusButton = true, bool disabled = false, const char* disabledTooltipText = "");
|
||||||
|
bool PaddedEnhancementSliderFloat(const char* text, const char* id, const char* cvarName, float min, float max, const char* format, float defaultValue, bool isPercentage, bool PlusMinusButton = true, bool padTop = true, bool padBottom = true, bool disabled = false, const char* disabledTooltipText = "");
|
||||||
|
|
||||||
bool EnhancementRadioButton(const char* text, const char* cvarName, int id);
|
bool EnhancementRadioButton(const char* text, const char* cvarName, int id);
|
||||||
|
|
||||||
bool EnhancementColor(const char* text, const char* cvarName, ImVec4 ColorRGBA, ImVec4 default_colors, bool allow_rainbow = true, bool has_alpha=false, bool TitleSameLine=false);
|
bool DrawResetColorButton(const char* cvarName, ImVec4* colors, ImVec4 defaultcolors, bool has_alpha);
|
||||||
|
bool DrawRandomizeColorButton(const char* cvarName, ImVec4* colors);
|
||||||
|
void DrawLockColorCheckbox(const char* cvarName);
|
||||||
|
void RainbowColor(const char* cvarName, ImVec4* colors);
|
||||||
|
|
||||||
|
void LoadPickersColors(ImVec4& ColorArray, const char* cvarname, const ImVec4& default_colors, bool has_alpha);
|
||||||
|
bool EnhancementColor(const char* text, const char* cvarName, ImVec4 ColorRGBA, ImVec4 default_colors, bool allow_rainbow = true, bool has_alpha = false, bool TitleSameLine = false);
|
||||||
|
|
||||||
void DrawFlagArray32(const std::string& name, uint32_t& flags);
|
void DrawFlagArray32(const std::string& name, uint32_t& flags);
|
||||||
void DrawFlagArray16(const std::string& name, uint16_t& flags);
|
void DrawFlagArray16(const std::string& name, uint16_t& flags);
|
||||||
void DrawFlagArray8(const std::string& name, uint8_t& flags);
|
void DrawFlagArray8(const std::string& name, uint8_t& flags);
|
||||||
|
Loading…
Reference in New Issue
Block a user