mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-12-22 08:08:53 -05:00
Step 2 of CVar macro/sectionalizing: Trackers/Windows (#3238)
* Add all macros. Replace all randomizer seed setting CVars with appropriate macro. Cleaned up non-gameplay-critical things that are part of Spock Race rando presets (like RTA timing, displaying timer, displaying the glitch lineup tick, or Fast File Select). * Wrong slash... * Fix DEVELOPER_CVAR macro. Add GENERAL_CVAR macro. * Change Item Tracker CVars, including open window CVar. * Swapped open window CVars. * Swapped Entrance Tracker CVars. * Swapped Check Tracker CVars. Changed Item Tracker "HudEditMode" to "Draggable". * Renamed `RANDOMIZER_CVAR` to `RANDO_ENHANCEMENT_CVAR`. Swapped rando enhancement CVars. * Mirroring last commit from part 1 in randomizer.cpp * Another mirror from pt 1
This commit is contained in:
parent
16bf03a9bd
commit
694a876a70
@ -3,6 +3,7 @@
|
||||
#include "public/bridge/consolevariablebridge.h"
|
||||
#include "libultraship/libultra/controller.h"
|
||||
#include "Context.h"
|
||||
#include "soh/OTRGlobals.h"
|
||||
#ifndef IMGUI_DEFINE_MATH_OPERATORS
|
||||
#define IMGUI_DEFINE_MATH_OPERATORS
|
||||
#endif
|
||||
@ -59,7 +60,7 @@ void InputViewer::RenderButton(std::string btnTexture, std::string btnOutlineTex
|
||||
}
|
||||
|
||||
void InputViewer::DrawElement() {
|
||||
if (CVarGetInteger("gOpenWindows.InputViewer", 0)) {
|
||||
if (CVarGetInteger(WINDOW_CVAR("InputViewer"), 0)) {
|
||||
static bool sButtonTexturesLoaded = false;
|
||||
if (!sButtonTexturesLoaded) {
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->LoadTextureFromRawImage(
|
||||
|
@ -283,10 +283,10 @@ const std::vector<const char*> enhancementsCvars = {
|
||||
|
||||
const std::vector<const char*> cheatCvars = {
|
||||
"gConsoleEnabled",
|
||||
"gActorViewerEnabled",
|
||||
"gCollisionViewerEnabled",
|
||||
"gDLViewerEnabled",
|
||||
"gSaveEditorEnabled",
|
||||
WINDOW_CVAR("ActorViewer"),
|
||||
WINDOW_CVAR("CollisionViewer"),
|
||||
WINDOW_CVAR("DLViewer"),
|
||||
WINDOW_CVAR("SaveEditor"),
|
||||
"gEnableWalkModify",
|
||||
"gWalkSpeedToggle",
|
||||
"gWalkModifierOne",
|
||||
@ -485,10 +485,10 @@ const std::vector<const char*> randomizerCvars = {
|
||||
RANDOMIZER_SEED_CVAR("TriforceHunt"),
|
||||
RANDOMIZER_SEED_CVAR("ShuffleMasterSword"),
|
||||
RANDOMIZER_SEED_CVAR("SariaHint"),
|
||||
"gRandomizeRupeeNames",
|
||||
RANDO_ENHANCEMENT_CVAR("RandomizeRupeeNames"),
|
||||
RANDOMIZER_SEED_CVAR("FrogsHint"),
|
||||
"gRandoRelevantNavi",
|
||||
"gRandoQuestItemFanfares",
|
||||
RANDO_ENHANCEMENT_CVAR("RandoRelevantNavi"),
|
||||
RANDO_ENHANCEMENT_CVAR("QuestItemFanfares"),
|
||||
};
|
||||
|
||||
const std::vector<PresetEntry> vanillaPlusPresetEntries = {
|
||||
|
@ -24,7 +24,7 @@ extern "C" void Randomizer_DrawSmallKey(PlayState* play, GetItemEntry* getItemEn
|
||||
s8 keysCanBeOutsideDungeon = getItemEntry->getItemId == RG_GERUDO_FORTRESS_SMALL_KEY ?
|
||||
Randomizer_GetSettingValue(RSK_GERUDO_KEYS) != RO_GERUDO_KEYS_VANILLA :
|
||||
DUNGEON_ITEMS_CAN_BE_OUTSIDE_DUNGEON(RSK_KEYSANITY);
|
||||
s8 isColoredKeysEnabled = keysCanBeOutsideDungeon && CVarGetInteger("gRandoMatchKeyColors", 1);
|
||||
s8 isColoredKeysEnabled = keysCanBeOutsideDungeon && CVarGetInteger(RANDO_ENHANCEMENT_CVAR("MatchKeyColors"), 1);
|
||||
s16 color_slot = getItemEntry->getItemId - RG_FOREST_TEMPLE_SMALL_KEY;
|
||||
s16 colors[9][3] = {
|
||||
{ 4, 195, 46 }, // Forest Temple
|
||||
@ -63,7 +63,7 @@ extern "C" void Randomizer_DrawBossKey(PlayState* play, GetItemEntry* getItemEnt
|
||||
s8 keysCanBeOutsideDungeon = getItemEntry->getItemId == RG_GANONS_CASTLE_BOSS_KEY ?
|
||||
DUNGEON_ITEMS_CAN_BE_OUTSIDE_DUNGEON(RSK_GANONS_BOSS_KEY) :
|
||||
DUNGEON_ITEMS_CAN_BE_OUTSIDE_DUNGEON(RSK_BOSS_KEYSANITY);
|
||||
s8 isColoredKeysEnabled = keysCanBeOutsideDungeon && CVarGetInteger("gRandoMatchKeyColors", 1);
|
||||
s8 isColoredKeysEnabled = keysCanBeOutsideDungeon && CVarGetInteger(RANDO_ENHANCEMENT_CVAR("MatchKeyColors"), 1);
|
||||
s16 color_slot;
|
||||
color_slot = getItemEntry->getItemId - RG_FOREST_TEMPLE_BOSS_KEY;
|
||||
s16 colors[6][3] = {
|
||||
|
@ -869,14 +869,14 @@ void UpdateCheck(uint32_t check, RandomizerCheckTrackerData data) {
|
||||
void CheckTrackerWindow::DrawElement() {
|
||||
ImGui::SetNextWindowSize(ImVec2(400, 540), ImGuiCond_FirstUseEver);
|
||||
|
||||
if (CVarGetInteger("gCheckTrackerWindowType", TRACKER_WINDOW_WINDOW) == TRACKER_WINDOW_FLOATING) {
|
||||
if (CVarGetInteger("gCheckTrackerShowOnlyPaused", 0) && (gPlayState == nullptr || gPlayState->pauseCtx.state == 0)) {
|
||||
if (CVarGetInteger(CHECK_TRACKER_CVAR("WindowType"), TRACKER_WINDOW_WINDOW) == TRACKER_WINDOW_FLOATING) {
|
||||
if (CVarGetInteger(CHECK_TRACKER_CVAR("ShowOnlyPaused"), 0) && (gPlayState == nullptr || gPlayState->pauseCtx.state == 0)) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (CVarGetInteger("gCheckTrackerDisplayType", TRACKER_DISPLAY_ALWAYS) == TRACKER_DISPLAY_COMBO_BUTTON) {
|
||||
int comboButton1Mask = buttons[CVarGetInteger("gCheckTrackerComboButton1", TRACKER_COMBO_BUTTON_L)];
|
||||
int comboButton2Mask = buttons[CVarGetInteger("gCheckTrackerComboButton2", TRACKER_COMBO_BUTTON_R)];
|
||||
if (CVarGetInteger(CHECK_TRACKER_CVAR("DisplayType"), TRACKER_DISPLAY_ALWAYS) == TRACKER_DISPLAY_COMBO_BUTTON) {
|
||||
int comboButton1Mask = buttons[CVarGetInteger(CHECK_TRACKER_CVAR("ComboButton1"), TRACKER_COMBO_BUTTON_L)];
|
||||
int comboButton2Mask = buttons[CVarGetInteger(CHECK_TRACKER_CVAR("ComboButton2"), TRACKER_COMBO_BUTTON_R)];
|
||||
OSContPad* trackerButtonsPressed = LUS::Context::GetInstance()->GetControlDeck()->GetPads();
|
||||
bool comboButtonsHeld = trackerButtonsPressed != nullptr &&
|
||||
trackerButtonsPressed[0].button & comboButton1Mask &&
|
||||
@ -916,7 +916,7 @@ void CheckTrackerWindow::DrawElement() {
|
||||
ImGui::TableNextRow(0, headerHeight);
|
||||
ImGui::TableNextColumn();
|
||||
UIWidgets::EnhancementCheckbox(
|
||||
"Show Hidden Items", "gCheckTrackerOptionShowHidden", false,
|
||||
"Show Hidden Items", CHECK_TRACKER_CVAR("ShowHidden"), false,
|
||||
"When active, items will show hidden checks by default when updated to this state.");
|
||||
UIWidgets::PaddedSeparator();
|
||||
if (ImGui::Button("Expand All")) {
|
||||
@ -955,17 +955,17 @@ void CheckTrackerWindow::DrawElement() {
|
||||
RainbowTick();
|
||||
bool doDraw = false;
|
||||
bool thisAreaFullyChecked = false;
|
||||
bool showHidden = CVarGetInteger("gCheckTrackerOptionShowHidden", 0);
|
||||
bool hideIncomplete = CVarGetInteger("gCheckTrackerAreaIncompleteHide", 0);
|
||||
bool hideComplete = CVarGetInteger("gCheckTrackerAreaCompleteHide", 0);
|
||||
bool showHidden = CVarGetInteger(CHECK_TRACKER_CVAR("ShowHidden"), 0);
|
||||
bool hideIncomplete = CVarGetInteger(CHECK_TRACKER_CVAR("AreaIncomplete.Hide"), 0);
|
||||
bool hideComplete = CVarGetInteger(CHECK_TRACKER_CVAR("AreaComplete.Hide"), 0);
|
||||
bool collapseLogic;
|
||||
bool doingCollapseOrExpand = optExpandAll || optCollapseAll;
|
||||
bool isThisAreaSpoiled;
|
||||
RandomizerCheckArea lastArea = RCAREA_INVALID;
|
||||
Color_RGBA8 areaCompleteColor = CVarGetColor("gCheckTrackerAreaMainCompleteColor", Color_Main_Default);
|
||||
Color_RGBA8 areaIncompleteColor = CVarGetColor("gCheckTrackerAreaMainIncompleteColor", Color_Main_Default);
|
||||
Color_RGBA8 extraCompleteColor = CVarGetColor("gCheckTrackerAreaExtraCompleteColor", Color_Area_Complete_Extra_Default);
|
||||
Color_RGBA8 extraIncompleteColor = CVarGetColor("gCheckTrackerAreaExtraIncompleteColor", Color_Area_Incomplete_Extra_Default);
|
||||
Color_RGBA8 areaCompleteColor = CVarGetColor(CHECK_TRACKER_CVAR("AreaComplete.MainColor"), Color_Main_Default);
|
||||
Color_RGBA8 areaIncompleteColor = CVarGetColor(CHECK_TRACKER_CVAR("AreaIncomplete.MainColor"), Color_Main_Default);
|
||||
Color_RGBA8 extraCompleteColor = CVarGetColor(CHECK_TRACKER_CVAR("AreaComplete.ExtraColor"), Color_Area_Complete_Extra_Default);
|
||||
Color_RGBA8 extraIncompleteColor = CVarGetColor(CHECK_TRACKER_CVAR("AreaIncomplete.ExtraColor"), Color_Area_Incomplete_Extra_Default);
|
||||
Color_RGBA8 mainColor;
|
||||
Color_RGBA8 extraColor;
|
||||
std::string stemp;
|
||||
@ -1020,7 +1020,7 @@ void CheckTrackerWindow::DrawElement() {
|
||||
ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(extraColor.r / 255.0f, extraColor.g / 255.0f,
|
||||
extraColor.b / 255.0f, extraColor.a / 255.0f));
|
||||
|
||||
isThisAreaSpoiled = IsAreaSpoiled(rcArea) || CVarGetInteger("gCheckTrackerOptionMQSpoilers", 0);
|
||||
isThisAreaSpoiled = IsAreaSpoiled(rcArea) || CVarGetInteger(CHECK_TRACKER_CVAR("MQSpoilers"), 0);
|
||||
|
||||
if (isThisAreaSpoiled) {
|
||||
if (showVOrMQ && RandomizerCheckObjects::AreaIsDungeon(rcArea)) {
|
||||
@ -1098,12 +1098,12 @@ void BeginFloatWindows(std::string UniqueName, bool& open, ImGuiWindowFlags flag
|
||||
ImGuiWindowFlags_AlwaysVerticalScrollbar | ImGuiWindowFlags_NoFocusOnAppearing;
|
||||
}
|
||||
|
||||
if (CVarGetInteger("gCheckTrackerWindowType", TRACKER_WINDOW_WINDOW) == TRACKER_WINDOW_FLOATING) {
|
||||
if (CVarGetInteger(CHECK_TRACKER_CVAR("WindowType"), TRACKER_WINDOW_WINDOW) == TRACKER_WINDOW_FLOATING) {
|
||||
ImGui::SetNextWindowViewport(ImGui::GetMainViewport()->ID);
|
||||
windowFlags |= ImGuiWindowFlags_NoDocking | ImGuiWindowFlags_NoNav | ImGuiWindowFlags_NoTitleBar |
|
||||
ImGuiWindowFlags_NoScrollWithMouse | ImGuiWindowFlags_NoScrollbar;
|
||||
|
||||
if (!CVarGetInteger("gCheckTrackerHudEditMode", 0)) {
|
||||
if (!CVarGetInteger(CHECK_TRACKER_CVAR("Draggable"), 0)) {
|
||||
windowFlags |= ImGuiWindowFlags_NoInputs | ImGuiWindowFlags_NoMove;
|
||||
}
|
||||
}
|
||||
@ -1363,52 +1363,52 @@ void DrawLocation(RandomizerCheckObject rcObj) {
|
||||
Color_RGBA8 mainColor;
|
||||
Color_RGBA8 extraColor;
|
||||
std::string txt;
|
||||
bool showHidden = CVarGetInteger("gCheckTrackerOptionShowHidden", 0);
|
||||
bool showHidden = CVarGetInteger(CHECK_TRACKER_CVAR("ShowHidden"), 0);
|
||||
RandomizerCheckTrackerData checkData = gSaveContext.checkTrackerData[rcObj.rc];
|
||||
RandomizerCheckStatus status = checkData.status;
|
||||
bool skipped = checkData.skipped;
|
||||
if (status == RCSHOW_COLLECTED) {
|
||||
if (!showHidden && CVarGetInteger("gCheckTrackerCollectedHide", 0)) {
|
||||
if (!showHidden && CVarGetInteger(CHECK_TRACKER_CVAR("Collected.Hide"), 0)) {
|
||||
return;
|
||||
}
|
||||
mainColor = !IsHeartPiece(rcObj.ogItemId) && !IS_RANDO ? CVarGetColor("gCheckTrackerCollectedExtraColor", Color_Collected_Extra_Default) :
|
||||
CVarGetColor("gCheckTrackerCollectedMainColor", Color_Main_Default);
|
||||
extraColor = CVarGetColor("gCheckTrackerCollectedExtraColor", Color_Collected_Extra_Default);
|
||||
mainColor = !IsHeartPiece(rcObj.ogItemId) && !IS_RANDO ? CVarGetColor(CHECK_TRACKER_CVAR("Collected.ExtraColor"), Color_Collected_Extra_Default) :
|
||||
CVarGetColor(CHECK_TRACKER_CVAR("Collected.MainColor"), Color_Main_Default);
|
||||
extraColor = CVarGetColor(CHECK_TRACKER_CVAR("Collected.ExtraColor"), Color_Collected_Extra_Default);
|
||||
} else if (status == RCSHOW_SAVED) {
|
||||
if (!showHidden && CVarGetInteger("gCheckTrackerSavedHide", 0)) {
|
||||
if (!showHidden && CVarGetInteger(CHECK_TRACKER_CVAR("Saved.Hide"), 0)) {
|
||||
return;
|
||||
}
|
||||
mainColor = !IsHeartPiece(rcObj.ogItemId) && !IS_RANDO ? CVarGetColor("gCheckTrackerSavedExtraColor", Color_Saved_Extra_Default) :
|
||||
CVarGetColor("gCheckTrackerSavedMainColor", Color_Main_Default);
|
||||
extraColor = CVarGetColor("gCheckTrackerSavedExtraColor", Color_Saved_Extra_Default);
|
||||
mainColor = !IsHeartPiece(rcObj.ogItemId) && !IS_RANDO ? CVarGetColor(CHECK_TRACKER_CVAR("Saved.ExtraColor"), Color_Saved_Extra_Default) :
|
||||
CVarGetColor(CHECK_TRACKER_CVAR("Saved.MainColor"), Color_Main_Default);
|
||||
extraColor = CVarGetColor(CHECK_TRACKER_CVAR("Saved.ExtraColor"), Color_Saved_Extra_Default);
|
||||
} else if (skipped) {
|
||||
if (!showHidden && CVarGetInteger("gCheckTrackerSkippedHide", 0)) {
|
||||
if (!showHidden && CVarGetInteger(CHECK_TRACKER_CVAR("Skipped.Hide"), 0)) {
|
||||
return;
|
||||
}
|
||||
mainColor = !IsHeartPiece(rcObj.ogItemId) && !IS_RANDO ? CVarGetColor("gCheckTrackerSkippedExtraColor", Color_Skipped_Extra_Default) :
|
||||
CVarGetColor("gCheckTrackerSkippedMainColor", Color_Main_Default);
|
||||
extraColor = CVarGetColor("gCheckTrackerSkippedExtraColor", Color_Skipped_Extra_Default);
|
||||
mainColor = !IsHeartPiece(rcObj.ogItemId) && !IS_RANDO ? CVarGetColor(CHECK_TRACKER_CVAR("Skipped.ExtraColor"), Color_Skipped_Extra_Default) :
|
||||
CVarGetColor(CHECK_TRACKER_CVAR("Skipped.MainColor"), Color_Main_Default);
|
||||
extraColor = CVarGetColor(CHECK_TRACKER_CVAR("Skipped.ExtraColor"), Color_Skipped_Extra_Default);
|
||||
} else if (status == RCSHOW_SEEN || status == RCSHOW_IDENTIFIED) {
|
||||
if (!showHidden && CVarGetInteger("gCheckTrackerSeenHide", 0)) {
|
||||
if (!showHidden && CVarGetInteger(CHECK_TRACKER_CVAR("Seen.Hide"), 0)) {
|
||||
return;
|
||||
}
|
||||
mainColor = !IsHeartPiece(rcObj.ogItemId) && !IS_RANDO ? CVarGetColor("gCheckTrackerSeenExtraColor", Color_Seen_Extra_Default) :
|
||||
CVarGetColor("gCheckTrackerSeenMainColor", Color_Main_Default);
|
||||
extraColor = CVarGetColor("gCheckTrackerSeenExtraColor", Color_Seen_Extra_Default);
|
||||
mainColor = !IsHeartPiece(rcObj.ogItemId) && !IS_RANDO ? CVarGetColor(CHECK_TRACKER_CVAR("Seen.ExtraColor"), Color_Seen_Extra_Default) :
|
||||
CVarGetColor(CHECK_TRACKER_CVAR("Seen.MainColor"), Color_Main_Default);
|
||||
extraColor = CVarGetColor(CHECK_TRACKER_CVAR("Seen.ExtraColor"), Color_Seen_Extra_Default);
|
||||
} else if (status == RCSHOW_SCUMMED) {
|
||||
if (!showHidden && CVarGetInteger("gCheckTrackerScummedHide", 0)) {
|
||||
if (!showHidden && CVarGetInteger(CHECK_TRACKER_CVAR("Scummed.Hide"), 0)) {
|
||||
return;
|
||||
}
|
||||
mainColor = !IsHeartPiece(rcObj.ogItemId) && !IS_RANDO ? CVarGetColor("gCheckTrackerScummedExtraColor", Color_Scummed_Extra_Default) :
|
||||
CVarGetColor("gCheckTrackerScummedMainColor", Color_Main_Default);
|
||||
extraColor = CVarGetColor("gCheckTrackerScummedExtraColor", Color_Scummed_Extra_Default);
|
||||
mainColor = !IsHeartPiece(rcObj.ogItemId) && !IS_RANDO ? CVarGetColor(CHECK_TRACKER_CVAR("Scummed.ExtraColor"), Color_Scummed_Extra_Default) :
|
||||
CVarGetColor(CHECK_TRACKER_CVAR("Scummed.MainColor"), Color_Main_Default);
|
||||
extraColor = CVarGetColor(CHECK_TRACKER_CVAR("Scummed.ExtraColor"), Color_Scummed_Extra_Default);
|
||||
} else if (status == RCSHOW_UNCHECKED) {
|
||||
if (!showHidden && CVarGetInteger("gCheckTrackerUncheckedHide", 0)) {
|
||||
if (!showHidden && CVarGetInteger(CHECK_TRACKER_CVAR("Unchecked.Hide"), 0)) {
|
||||
return;
|
||||
}
|
||||
mainColor = !IsHeartPiece(rcObj.ogItemId) && !IS_RANDO ? CVarGetColor("gCheckTrackerUncheckedExtraColor", Color_Unchecked_Extra_Default) :
|
||||
CVarGetColor("gCheckTrackerUncheckedMainColor", Color_Main_Default);
|
||||
extraColor = CVarGetColor("gCheckTrackerUncheckedExtraColor", Color_Unchecked_Extra_Default);
|
||||
mainColor = !IsHeartPiece(rcObj.ogItemId) && !IS_RANDO ? CVarGetColor(CHECK_TRACKER_CVAR("Unchecked.ExtraColor"), Color_Unchecked_Extra_Default) :
|
||||
CVarGetColor(CHECK_TRACKER_CVAR("Unchecked.MainColor"), Color_Main_Default);
|
||||
extraColor = CVarGetColor(CHECK_TRACKER_CVAR("Unchecked.ExtraColor"), Color_Unchecked_Extra_Default);
|
||||
}
|
||||
|
||||
//Main Text
|
||||
@ -1503,15 +1503,15 @@ void DrawLocation(RandomizerCheckObject rcObj) {
|
||||
}
|
||||
|
||||
static std::set<std::string> rainbowCVars = {
|
||||
"gCheckTrackerAreaMainIncompleteColor", "gCheckTrackerAreaExtraIncompleteColor",
|
||||
"gCheckTrackerAreaMainCompleteColor", "gCheckTrackerAreaExtraCompleteColor",
|
||||
"gCheckTrackerUncheckedMainColor", "gCheckTrackerUncheckedExtraColor",
|
||||
"gCheckTrackerSkippedMainColor", "gCheckTrackerSkippedExtraColor",
|
||||
"gCheckTrackerSeenMainColor", "gCheckTrackerSeenExtraColor",
|
||||
"gCheckTrackerHintedMainColor", "gCheckTrackerHintedExtraColor",
|
||||
"gCheckTrackerCollectedMainColor", "gCheckTrackerCollectedExtraColor",
|
||||
"gCheckTrackerScummedMainColor", "gCheckTrackerScummedExtraColor",
|
||||
"gCheckTrackerSavedMainColor", "gCheckTrackerSavedExtraColor",
|
||||
CHECK_TRACKER_CVAR("AreaIncomplete.MainColor"), CHECK_TRACKER_CVAR("AreaIncomplete.ExtraColor"),
|
||||
CHECK_TRACKER_CVAR("AreaComplete.MainColor"), CHECK_TRACKER_CVAR("AreaComplete.ExtraColor"),
|
||||
CHECK_TRACKER_CVAR("Unchecked.MainColor"), CHECK_TRACKER_CVAR("Unchecked.ExtraColor"),
|
||||
CHECK_TRACKER_CVAR("Skipped.MainColor"), CHECK_TRACKER_CVAR("Skipped.ExtraColor"),
|
||||
CHECK_TRACKER_CVAR("Seen.MainColor"), CHECK_TRACKER_CVAR("Seen.ExtraColor"),
|
||||
CHECK_TRACKER_CVAR("Hinted.MainColor"), CHECK_TRACKER_CVAR("Hinted.ExtraColor"),
|
||||
CHECK_TRACKER_CVAR("Collected.MainColor"), CHECK_TRACKER_CVAR("Collected.ExtraColor"),
|
||||
CHECK_TRACKER_CVAR("Scummed.MainColor"), CHECK_TRACKER_CVAR("Scummed.ExtraColor"),
|
||||
CHECK_TRACKER_CVAR("Saved.MainColor"), CHECK_TRACKER_CVAR("Saved.ExtraColor"),
|
||||
};
|
||||
|
||||
int hue = 0;
|
||||
@ -1606,33 +1606,33 @@ void CheckTrackerSettingsWindow::DrawElement() {
|
||||
ImGui::TableNextRow();
|
||||
ImGui::TableNextColumn();
|
||||
ImGui::PushItemWidth(ImGui::GetContentRegionAvail().x);
|
||||
if (UIWidgets::EnhancementColor("BG Color", "gCheckTrackerBgColor",
|
||||
if (UIWidgets::EnhancementColor("BG Color", CHECK_TRACKER_CVAR("BgColor"),
|
||||
ImVec4(Color_Background.r, Color_Background.g, Color_Background.b, Color_Background.a),
|
||||
ImVec4(Color_Bg_Default.r, Color_Bg_Default.g, Color_Bg_Default.b, Color_Bg_Default.a),
|
||||
false, true))
|
||||
{
|
||||
Color_Background = CVarGetColor("gCheckTrackerBgColor", Color_Bg_Default);
|
||||
Color_Background = CVarGetColor(CHECK_TRACKER_CVAR("BgColor"), Color_Bg_Default);
|
||||
}
|
||||
ImGui::PopItemWidth();
|
||||
|
||||
UIWidgets::LabeledRightAlignedEnhancementCombobox("Window Type", "gCheckTrackerWindowType", windowType, TRACKER_WINDOW_WINDOW);
|
||||
if (CVarGetInteger("gCheckTrackerWindowType", TRACKER_WINDOW_WINDOW) == TRACKER_WINDOW_FLOATING) {
|
||||
UIWidgets::EnhancementCheckbox("Enable Dragging", "gCheckTrackerHudEditMode");
|
||||
UIWidgets::EnhancementCheckbox("Only enable while paused", "gCheckTrackerShowOnlyPaused");
|
||||
UIWidgets::LabeledRightAlignedEnhancementCombobox("Display Mode", "gCheckTrackerDisplayType", displayType, 0);
|
||||
if (CVarGetInteger("gCheckTrackerDisplayType", TRACKER_DISPLAY_ALWAYS) == TRACKER_DISPLAY_COMBO_BUTTON) {
|
||||
UIWidgets::LabeledRightAlignedEnhancementCombobox("Combo Button 1", "gCheckTrackerComboButton1", buttonStrings, TRACKER_COMBO_BUTTON_L);
|
||||
UIWidgets::LabeledRightAlignedEnhancementCombobox("Combo Button 2", "gCheckTrackerComboButton2", buttonStrings, TRACKER_COMBO_BUTTON_R);
|
||||
UIWidgets::LabeledRightAlignedEnhancementCombobox("Window Type", CHECK_TRACKER_CVAR("WindowType"), windowType, TRACKER_WINDOW_WINDOW);
|
||||
if (CVarGetInteger(CHECK_TRACKER_CVAR("WindowType"), TRACKER_WINDOW_WINDOW) == TRACKER_WINDOW_FLOATING) {
|
||||
UIWidgets::EnhancementCheckbox("Enable Dragging", CHECK_TRACKER_CVAR("Draggable"));
|
||||
UIWidgets::EnhancementCheckbox("Only enable while paused", CHECK_TRACKER_CVAR("ShowOnlyPaused"));
|
||||
UIWidgets::LabeledRightAlignedEnhancementCombobox("Display Mode", CHECK_TRACKER_CVAR("DisplayType"), displayType, 0);
|
||||
if (CVarGetInteger(CHECK_TRACKER_CVAR("DisplayType"), TRACKER_DISPLAY_ALWAYS) == TRACKER_DISPLAY_COMBO_BUTTON) {
|
||||
UIWidgets::LabeledRightAlignedEnhancementCombobox("Combo Button 1", CHECK_TRACKER_CVAR("ComboButton1"), buttonStrings, TRACKER_COMBO_BUTTON_L);
|
||||
UIWidgets::LabeledRightAlignedEnhancementCombobox("Combo Button 2", CHECK_TRACKER_CVAR("ComboButton2"), buttonStrings, TRACKER_COMBO_BUTTON_R);
|
||||
}
|
||||
}
|
||||
UIWidgets::EnhancementCheckbox("Vanilla/MQ Dungeon Spoilers", "gCheckTrackerOptionMQSpoilers");
|
||||
UIWidgets::EnhancementCheckbox("Vanilla/MQ Dungeon Spoilers", CHECK_TRACKER_CVAR("MQSpoilers"));
|
||||
UIWidgets::Tooltip("If enabled, Vanilla/MQ dungeons will show on the tracker immediately. Otherwise, Vanilla/MQ dungeon locations must be unlocked.");
|
||||
if (UIWidgets::EnhancementCheckbox("Hide right-side shop item checks", "gCheckTrackerOptionHideRightShopChecks", false, "", UIWidgets::CheckboxGraphics::Cross, true)) {
|
||||
if (UIWidgets::EnhancementCheckbox("Hide right-side shop item checks", CHECK_TRACKER_CVAR("HideRightShopChecks"), false, "", UIWidgets::CheckboxGraphics::Cross, true)) {
|
||||
hideShopRightChecks = !hideShopRightChecks;
|
||||
RecalculateAreaTotals();
|
||||
}
|
||||
UIWidgets::Tooltip("If enabled, will prevent the tracker from displaying slots 1-4 in all shops.");
|
||||
if (UIWidgets::EnhancementCheckbox("Always show gold skulltulas", "gCheckTrackerOptionAlwaysShowGSLocs", false, "")) {
|
||||
if (UIWidgets::EnhancementCheckbox("Always show gold skulltulas", CHECK_TRACKER_CVAR("AlwaysShowGSLocs"), false, "")) {
|
||||
alwaysShowGS = !alwaysShowGS;
|
||||
RecalculateAreaTotals();
|
||||
}
|
||||
@ -1645,15 +1645,15 @@ void CheckTrackerSettingsWindow::DrawElement() {
|
||||
|
||||
ImGui::TableNextColumn();
|
||||
|
||||
CheckTracker::ImGuiDrawTwoColorPickerSection("Area Incomplete", "gCheckTrackerAreaMainIncompleteColor", "gCheckTrackerAreaExtraIncompleteColor", Color_Area_Incomplete_Main, Color_Area_Incomplete_Extra, Color_Main_Default, Color_Area_Incomplete_Extra_Default, "gCheckTrackerAreaIncompleteHide", "");
|
||||
CheckTracker::ImGuiDrawTwoColorPickerSection("Area Complete", "gCheckTrackerAreaMainCompleteColor", "gCheckTrackerAreaExtraCompleteColor", Color_Area_Complete_Main, Color_Area_Complete_Extra, Color_Main_Default, Color_Area_Complete_Extra_Default, "gCheckTrackerAreaCompleteHide", "");
|
||||
CheckTracker::ImGuiDrawTwoColorPickerSection("Unchecked", "gCheckTrackerUncheckedMainColor", "gCheckTrackerUncheckedExtraColor", Color_Unchecked_Main, Color_Unchecked_Extra, Color_Main_Default, Color_Unchecked_Extra_Default, "gCheckTrackerUncheckedHide", "Checks you have not interacted with at all.");
|
||||
CheckTracker::ImGuiDrawTwoColorPickerSection("Skipped", "gCheckTrackerSkippedMainColor", "gCheckTrackerSkippedExtraColor", Color_Skipped_Main, Color_Skipped_Extra, Color_Main_Default, Color_Skipped_Extra_Default, "gCheckTrackerSkippedHide", "");
|
||||
CheckTracker::ImGuiDrawTwoColorPickerSection("Seen", "gCheckTrackerSeenMainColor", "gCheckTrackerSeenExtraColor", Color_Seen_Main, Color_Seen_Extra, Color_Main_Default, Color_Seen_Extra_Default, "gCheckTrackerSeenHide", "Used for shops. Shows item names for shop slots when walking in, and prices when highlighting them in buy mode.");
|
||||
CheckTracker::ImGuiDrawTwoColorPickerSection("Scummed", "gCheckTrackerScummedMainColor", "gCheckTrackerScummedExtraColor", Color_Scummed_Main, Color_Scummed_Extra, Color_Main_Default, Color_Scummed_Extra_Default, "gCheckTrackerScummedHide", "Checks you collect, but then reload before saving so you no longer have them.");
|
||||
//CheckTracker::ImGuiDrawTwoColorPickerSection("Hinted (WIP)", "gCheckTrackerHintedMainColor", "gCheckTrackerHintedExtraColor", Color_Hinted_Main, Color_Hinted_Extra, Color_Main_Default, Color_Hinted_Extra_Default, "gCheckTrackerHintedHide", "");
|
||||
CheckTracker::ImGuiDrawTwoColorPickerSection("Collected", "gCheckTrackerCollectedMainColor", "gCheckTrackerCollectedExtraColor", Color_Collected_Main, Color_Collected_Extra, Color_Main_Default, Color_Collected_Extra_Default, "gCheckTrackerCollectedHide", "Checks you have collected without saving or reloading yet.");
|
||||
CheckTracker::ImGuiDrawTwoColorPickerSection("Saved", "gCheckTrackerSavedMainColor", "gCheckTrackerSavedExtraColor", Color_Saved_Main, Color_Saved_Extra, Color_Main_Default, Color_Saved_Extra_Default, "gCheckTrackerSavedHide", "Checks that you saved the game while having collected.");
|
||||
CheckTracker::ImGuiDrawTwoColorPickerSection("Area Incomplete", CHECK_TRACKER_CVAR("AreaIncomplete.MainColor"), CHECK_TRACKER_CVAR("AreaIncomplete.ExtraColor"), Color_Area_Incomplete_Main, Color_Area_Incomplete_Extra, Color_Main_Default, Color_Area_Incomplete_Extra_Default, CHECK_TRACKER_CVAR("AreaIncomplete.Hide"), "");
|
||||
CheckTracker::ImGuiDrawTwoColorPickerSection("Area Complete", CHECK_TRACKER_CVAR("AreaComplete.MainColor"), CHECK_TRACKER_CVAR("AreaComplete.ExtraColor"), Color_Area_Complete_Main, Color_Area_Complete_Extra, Color_Main_Default, Color_Area_Complete_Extra_Default, CHECK_TRACKER_CVAR("AreaComplete.Hide"), "");
|
||||
CheckTracker::ImGuiDrawTwoColorPickerSection("Unchecked", CHECK_TRACKER_CVAR("Unchecked.MainColor"), CHECK_TRACKER_CVAR("Unchecked.ExtraColor"), Color_Unchecked_Main, Color_Unchecked_Extra, Color_Main_Default, Color_Unchecked_Extra_Default, CHECK_TRACKER_CVAR("Unchecked.Hide"), "Checks you have not interacted with at all.");
|
||||
CheckTracker::ImGuiDrawTwoColorPickerSection("Skipped", CHECK_TRACKER_CVAR("Skipped.MainColor"), CHECK_TRACKER_CVAR("Skipped.ExtraColor"), Color_Skipped_Main, Color_Skipped_Extra, Color_Main_Default, Color_Skipped_Extra_Default, CHECK_TRACKER_CVAR("Skipped.Hide"), "");
|
||||
CheckTracker::ImGuiDrawTwoColorPickerSection("Seen", CHECK_TRACKER_CVAR("Seen.MainColor"), CHECK_TRACKER_CVAR("Seen.ExtraColor"), Color_Seen_Main, Color_Seen_Extra, Color_Main_Default, Color_Seen_Extra_Default, CHECK_TRACKER_CVAR("Seen.Hide"), "Used for shops. Shows item names for shop slots when walking in, and prices when highlighting them in buy mode.");
|
||||
CheckTracker::ImGuiDrawTwoColorPickerSection("Scummed", CHECK_TRACKER_CVAR("Scummed.MainColor"), CHECK_TRACKER_CVAR("Scummed.ExtraColor"), Color_Scummed_Main, Color_Scummed_Extra, Color_Main_Default, Color_Scummed_Extra_Default, "gCheckTrackerScummedHide", "Checks you collect, but then reload before saving so you no longer have them.");
|
||||
//CheckTracker::ImGuiDrawTwoColorPickerSection("Hinted (WIP)", CHECK_TRACKER_CVAR("Hinted.MainColor"), CHECK_TRACKER_CVAR("Hinted.ExtraColor"), Color_Hinted_Main, Color_Hinted_Extra, Color_Main_Default, Color_Hinted_Extra_Default, CHECK_TRACKER_CVAR("Hinted.Hide"), "");
|
||||
CheckTracker::ImGuiDrawTwoColorPickerSection("Collected", CHECK_TRACKER_CVAR("Collected.MainColor"), CHECK_TRACKER_CVAR("Collected.ExtraColor"), Color_Collected_Main, Color_Collected_Extra, Color_Main_Default, Color_Collected_Extra_Default, CHECK_TRACKER_CVAR("Collected.Hide"), "Checks you have collected without saving or reloading yet.");
|
||||
CheckTracker::ImGuiDrawTwoColorPickerSection("Saved", CHECK_TRACKER_CVAR("Saved.MainColor"), CHECK_TRACKER_CVAR("Saved.ExtraColor"), Color_Saved_Main, Color_Saved_Extra, Color_Main_Default, Color_Saved_Extra_Default, CHECK_TRACKER_CVAR("Saved.Hide"), "Checks that you saved the game while having collected.");
|
||||
|
||||
ImGui::PopStyleVar(1);
|
||||
ImGui::EndTable();
|
||||
@ -1661,25 +1661,25 @@ void CheckTrackerSettingsWindow::DrawElement() {
|
||||
}
|
||||
|
||||
void CheckTrackerWindow::InitElement() {
|
||||
Color_Background = CVarGetColor("gCheckTrackerBgColor", Color_Bg_Default);
|
||||
Color_Area_Incomplete_Main = CVarGetColor("gCheckTrackerAreaMainIncompleteColor", Color_Main_Default);
|
||||
Color_Area_Incomplete_Extra = CVarGetColor("gCheckTrackerAreaExtraIncompleteColor", Color_Area_Incomplete_Extra_Default);
|
||||
Color_Area_Complete_Main = CVarGetColor("gCheckTrackerAreaMainCompleteColor", Color_Main_Default);
|
||||
Color_Area_Complete_Extra = CVarGetColor("gCheckTrackerAreaExtraCompleteColor", Color_Area_Complete_Extra_Default);
|
||||
Color_Unchecked_Main = CVarGetColor("gCheckTrackerUncheckedMainColor", Color_Main_Default);
|
||||
Color_Unchecked_Extra = CVarGetColor("gCheckTrackerUncheckedExtraColor", Color_Unchecked_Extra_Default);
|
||||
Color_Skipped_Main = CVarGetColor("gCheckTrackerSkippedMainColor", Color_Main_Default);
|
||||
Color_Skipped_Extra = CVarGetColor("gCheckTrackerSkippedExtraColor", Color_Skipped_Extra_Default);
|
||||
Color_Seen_Main = CVarGetColor("gCheckTrackerSeenMainColor", Color_Main_Default);
|
||||
Color_Seen_Extra = CVarGetColor("gCheckTrackerSeenExtraColor", Color_Seen_Extra_Default);
|
||||
Color_Hinted_Main = CVarGetColor("gCheckTrackerHintedMainColor", Color_Main_Default);
|
||||
Color_Hinted_Extra = CVarGetColor("gCheckTrackerHintedExtraColor", Color_Hinted_Extra_Default);
|
||||
Color_Collected_Main = CVarGetColor("gCheckTrackerCollectedMainColor", Color_Main_Default);
|
||||
Color_Collected_Extra = CVarGetColor("gCheckTrackerCollectedExtraColor", Color_Collected_Extra_Default);
|
||||
Color_Scummed_Main = CVarGetColor("gCheckTrackerScummedMainColor", Color_Main_Default);
|
||||
Color_Scummed_Extra = CVarGetColor("gCheckTrackerScummedExtraColor", Color_Scummed_Extra_Default);
|
||||
Color_Saved_Main = CVarGetColor("gCheckTrackerSavedMainColor", Color_Main_Default);
|
||||
Color_Saved_Extra = CVarGetColor("gCheckTrackerSavedExtraColor", Color_Saved_Extra_Default);
|
||||
Color_Background = CVarGetColor(CHECK_TRACKER_CVAR("BgColor"), Color_Bg_Default);
|
||||
Color_Area_Incomplete_Main = CVarGetColor(CHECK_TRACKER_CVAR("AreaIncomplete.MainColor"), Color_Main_Default);
|
||||
Color_Area_Incomplete_Extra = CVarGetColor(CHECK_TRACKER_CVAR("AreaIncomplete.ExtraColor"), Color_Area_Incomplete_Extra_Default);
|
||||
Color_Area_Complete_Main = CVarGetColor(CHECK_TRACKER_CVAR("AreaComplete.MainColor"), Color_Main_Default);
|
||||
Color_Area_Complete_Extra = CVarGetColor(CHECK_TRACKER_CVAR("AreaComplete.ExtraColor"), Color_Area_Complete_Extra_Default);
|
||||
Color_Unchecked_Main = CVarGetColor(CHECK_TRACKER_CVAR("Unchecked.MainColor"), Color_Main_Default);
|
||||
Color_Unchecked_Extra = CVarGetColor(CHECK_TRACKER_CVAR("Unchecked.ExtraColor"), Color_Unchecked_Extra_Default);
|
||||
Color_Skipped_Main = CVarGetColor(CHECK_TRACKER_CVAR("Skipped.MainColor"), Color_Main_Default);
|
||||
Color_Skipped_Extra = CVarGetColor(CHECK_TRACKER_CVAR("Skipped.ExtraColor"), Color_Skipped_Extra_Default);
|
||||
Color_Seen_Main = CVarGetColor(CHECK_TRACKER_CVAR("Seen.MainColor"), Color_Main_Default);
|
||||
Color_Seen_Extra = CVarGetColor(CHECK_TRACKER_CVAR("Seen.ExtraColor"), Color_Seen_Extra_Default);
|
||||
Color_Hinted_Main = CVarGetColor(CHECK_TRACKER_CVAR("Hinted.MainColor"), Color_Main_Default);
|
||||
Color_Hinted_Extra = CVarGetColor(CHECK_TRACKER_CVAR("Hinted.ExtraColor"), Color_Hinted_Extra_Default);
|
||||
Color_Collected_Main = CVarGetColor(CHECK_TRACKER_CVAR("Collected.MainColor"), Color_Main_Default);
|
||||
Color_Collected_Extra = CVarGetColor(CHECK_TRACKER_CVAR("Collected.ExtraColor"), Color_Collected_Extra_Default);
|
||||
Color_Scummed_Main = CVarGetColor(CHECK_TRACKER_CVAR("Scummed.MainColor"), Color_Main_Default);
|
||||
Color_Scummed_Extra = CVarGetColor(CHECK_TRACKER_CVAR("Scummed.ExtraColor"), Color_Scummed_Extra_Default);
|
||||
Color_Saved_Main = CVarGetColor(CHECK_TRACKER_CVAR("Saved.MainColor"), Color_Main_Default);
|
||||
Color_Saved_Extra = CVarGetColor(CHECK_TRACKER_CVAR("Saved.ExtraColor"), Color_Saved_Extra_Default);
|
||||
|
||||
SaveManager::Instance->AddInitFunction(InitTrackerData);
|
||||
sectionId = SaveManager::Instance->AddSaveFunction("trackerData", 1, SaveFile, true, -1);
|
||||
@ -1695,8 +1695,8 @@ void CheckTrackerWindow::InitElement() {
|
||||
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnSceneFlagSet>(CheckTrackerSceneFlagSet);
|
||||
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnFlagSet>(CheckTrackerFlagSet);
|
||||
|
||||
hideShopRightChecks = CVarGetInteger("gCheckTrackerOptionHideRightShopChecks", 1);
|
||||
alwaysShowGS = CVarGetInteger("gCheckTrackerOptionAlwaysShowGSLocs", 0);
|
||||
hideShopRightChecks = CVarGetInteger(CHECK_TRACKER_CVAR("HideRightShopChecks"), 1);
|
||||
alwaysShowGS = CVarGetInteger(CHECK_TRACKER_CVAR("AlwaysShowGSLocs"), 0);
|
||||
|
||||
LocationTable_Init();
|
||||
}
|
||||
|
@ -665,25 +665,25 @@ void EntranceTrackerWindow::DrawElement() {
|
||||
ImGui::TableNextColumn();
|
||||
|
||||
ImGui::Text("Sort By");
|
||||
UIWidgets::EnhancementRadioButton("To", "gEntranceTrackerSortBy", 0);
|
||||
UIWidgets::EnhancementRadioButton("To", ENTRANCE_TRACKER_CVAR("SortBy"), 0);
|
||||
UIWidgets::Tooltip("Sort entrances by the original source entrance");
|
||||
UIWidgets::EnhancementRadioButton("From", "gEntranceTrackerSortBy", 1);
|
||||
UIWidgets::EnhancementRadioButton("From", ENTRANCE_TRACKER_CVAR("SortBy"), 1);
|
||||
UIWidgets::Tooltip("Sort entrances by the overrided destination");
|
||||
|
||||
UIWidgets::Spacer(2.0f);
|
||||
|
||||
ImGui::Text("List Items");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Auto scroll", "gEntranceTrackerAutoScroll", true, false);
|
||||
UIWidgets::PaddedEnhancementCheckbox("Auto scroll", ENTRANCE_TRACKER_CVAR("AutoScroll"), true, false);
|
||||
UIWidgets::Tooltip("Automatically scroll to the first aviable entrance in the current scene");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Highlight previous", "gEntranceTrackerHighlightPrevious", true, false);
|
||||
UIWidgets::PaddedEnhancementCheckbox("Highlight previous", ENTRANCE_TRACKER_CVAR("HighlightPrevious"), true, false);
|
||||
UIWidgets::Tooltip("Highlight the previous entrance that Link came from");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Highlight available", "gEntranceTrackerHighlightAvailable", true, false);
|
||||
UIWidgets::PaddedEnhancementCheckbox("Highlight available", ENTRANCE_TRACKER_CVAR("HighlightAvailable"), true, false);
|
||||
UIWidgets::Tooltip("Highlight available entrances in the current scene");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Hide undiscovered", "gEntranceTrackerCollapseUndiscovered", true, false);
|
||||
UIWidgets::PaddedEnhancementCheckbox("Hide undiscovered", ENTRANCE_TRACKER_CVAR("CollapseUndiscovered"), true, false);
|
||||
UIWidgets::Tooltip("Collapse undiscovered entrances towards the bottom of each group");
|
||||
bool disableHideReverseEntrances = OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_DECOUPLED_ENTRANCES) == RO_GENERIC_ON;
|
||||
static const char* disableHideReverseEntrancesText = "This option is disabled because \"Decouple Entrances\" is enabled.";
|
||||
UIWidgets::PaddedEnhancementCheckbox("Hide reverse", "gEntranceTrackerHideReverseEntrances", true, false,
|
||||
UIWidgets::PaddedEnhancementCheckbox("Hide reverse", ENTRANCE_TRACKER_CVAR("HideReverseEntrances"), true, false,
|
||||
disableHideReverseEntrances, disableHideReverseEntrancesText, UIWidgets::CheckboxGraphics::Cross, true);
|
||||
UIWidgets::Tooltip("Hide reverse entrance transitions when Decouple Entrances is off");
|
||||
UIWidgets::Spacer(0);
|
||||
@ -691,17 +691,17 @@ void EntranceTrackerWindow::DrawElement() {
|
||||
ImGui::TableNextColumn();
|
||||
|
||||
ImGui::Text("Group By");
|
||||
UIWidgets::EnhancementRadioButton("Area", "gEntranceTrackerGroupBy", 0);
|
||||
UIWidgets::EnhancementRadioButton("Area", ENTRANCE_TRACKER_CVAR("GroupBy"), 0);
|
||||
UIWidgets::Tooltip("Group entrances by their area");
|
||||
UIWidgets::EnhancementRadioButton("Type", "gEntranceTrackerGroupBy", 1);
|
||||
UIWidgets::EnhancementRadioButton("Type", ENTRANCE_TRACKER_CVAR("GroupBy"), 1);
|
||||
UIWidgets::Tooltip("Group entrances by their entrance type");
|
||||
|
||||
UIWidgets::Spacer(2.0f);
|
||||
|
||||
ImGui::Text("Spoiler Reveal");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Show \"To\"", "gEntranceTrackerShowTo", true, false);
|
||||
UIWidgets::PaddedEnhancementCheckbox("Show \"To\"", ENTRANCE_TRACKER_CVAR("ShowTo"), true, false);
|
||||
UIWidgets::Tooltip("Reveal the \"To\" entrance for undiscovered entrances");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Show \"From\"", "gEntranceTrackerShowFrom", true, false);
|
||||
UIWidgets::PaddedEnhancementCheckbox("Show \"From\"", ENTRANCE_TRACKER_CVAR("ShowFrom"), true, false);
|
||||
UIWidgets::Tooltip("Reveal the \"From\" entrance for undiscovered entrances");
|
||||
|
||||
ImGui::EndTable();
|
||||
@ -749,8 +749,8 @@ void EntranceTrackerWindow::DrawElement() {
|
||||
nextTreeState = 2;
|
||||
}
|
||||
|
||||
uint8_t destToggle = CVarGetInteger("gEntranceTrackerSortBy", 0);
|
||||
uint8_t groupToggle = CVarGetInteger("gEntranceTrackerGroupBy", 0);
|
||||
uint8_t destToggle = CVarGetInteger(ENTRANCE_TRACKER_CVAR("SortBy"), 0);
|
||||
uint8_t groupToggle = CVarGetInteger(ENTRANCE_TRACKER_CVAR("GroupBy"), 0);
|
||||
|
||||
// Combine destToggle and groupToggle to get a range of 0-3
|
||||
uint8_t groupType = destToggle + (groupToggle * 2);
|
||||
@ -801,7 +801,7 @@ void EntranceTrackerWindow::DrawElement() {
|
||||
// However, if entrances are decoupled, then all transitions need to be displayed, so we proceed with the filtering
|
||||
if ((original->type == ENTRANCE_TYPE_DUNGEON || original->type == ENTRANCE_TYPE_GROTTO || original->type == ENTRANCE_TYPE_INTERIOR) &&
|
||||
(original->oneExit != 1 && OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_DECOUPLED_ENTRANCES) == RO_GENERIC_OFF) &&
|
||||
CVarGetInteger("gEntranceTrackerHideReverseEntrances", 1) == 1) {
|
||||
CVarGetInteger(ENTRANCE_TRACKER_CVAR("HideReverseEntrances"), 1) == 1) {
|
||||
continue;
|
||||
}
|
||||
|
||||
@ -812,8 +812,8 @@ void EntranceTrackerWindow::DrawElement() {
|
||||
|
||||
bool isDiscovered = IsEntranceDiscovered(entrance.index);
|
||||
|
||||
bool showOriginal = (!destToggle ? CVarGetInteger("gEntranceTrackerShowTo", 0) : CVarGetInteger("gEntranceTrackerShowFrom", 0)) || isDiscovered;
|
||||
bool showOverride = (!destToggle ? CVarGetInteger("gEntranceTrackerShowFrom", 0) : CVarGetInteger("gEntranceTrackerShowTo", 0)) || isDiscovered;
|
||||
bool showOriginal = (!destToggle ? CVarGetInteger(ENTRANCE_TRACKER_CVAR("ShowTo"), 0) : CVarGetInteger(ENTRANCE_TRACKER_CVAR("ShowFrom"), 0)) || isDiscovered;
|
||||
bool showOverride = (!destToggle ? CVarGetInteger(ENTRANCE_TRACKER_CVAR("ShowFrom"), 0) : CVarGetInteger(ENTRANCE_TRACKER_CVAR("ShowTo"), 0)) || isDiscovered;
|
||||
|
||||
const char* origSrcAreaName = spoilerEntranceGroupNames[original->srcGroup].c_str();
|
||||
const char* origTypeName = groupTypeNames[original->type].c_str();
|
||||
@ -826,7 +826,7 @@ void EntranceTrackerWindow::DrawElement() {
|
||||
const char* rplcDstName = showOverride ? override->destination.c_str() : "";
|
||||
|
||||
// Filter for entrances by group name, type, source/destination names, and meta tags
|
||||
if ((!locationSearch.IsActive() && (showOriginal || showOverride || !CVarGetInteger("gEntranceTrackerCollapseUndiscovered", 0))) ||
|
||||
if ((!locationSearch.IsActive() && (showOriginal || showOverride || !CVarGetInteger(ENTRANCE_TRACKER_CVAR("CollapseUndiscovered"), 0))) ||
|
||||
((showOriginal && (locationSearch.PassFilter(origSrcName) ||
|
||||
locationSearch.PassFilter(origDstName) || locationSearch.PassFilter(origSrcAreaName) ||
|
||||
locationSearch.PassFilter(origTypeName) || locationSearch.PassFilter(original->metaTag.c_str()))) ||
|
||||
@ -864,8 +864,8 @@ void EntranceTrackerWindow::DrawElement() {
|
||||
|
||||
bool isDiscovered = IsEntranceDiscovered(entrance.index);
|
||||
|
||||
bool showOriginal = (!destToggle ? CVarGetInteger("gEntranceTrackerShowTo", 0) : CVarGetInteger("gEntranceTrackerShowFrom", 0)) || isDiscovered;
|
||||
bool showOverride = (!destToggle ? CVarGetInteger("gEntranceTrackerShowFrom", 0) : CVarGetInteger("gEntranceTrackerShowTo", 0)) || isDiscovered;
|
||||
bool showOriginal = (!destToggle ? CVarGetInteger(ENTRANCE_TRACKER_CVAR("ShowTo"), 0) : CVarGetInteger(ENTRANCE_TRACKER_CVAR("ShowFrom"), 0)) || isDiscovered;
|
||||
bool showOverride = (!destToggle ? CVarGetInteger(ENTRANCE_TRACKER_CVAR("ShowFrom"), 0) : CVarGetInteger(ENTRANCE_TRACKER_CVAR("ShowTo"), 0)) || isDiscovered;
|
||||
|
||||
const char* unknown = "???";
|
||||
|
||||
@ -879,16 +879,16 @@ void EntranceTrackerWindow::DrawElement() {
|
||||
// Handle highlighting and auto scroll
|
||||
if ((original->index == lastEntranceIndex ||
|
||||
(override->reverseIndex == lastEntranceIndex && OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_DECOUPLED_ENTRANCES) == RO_GENERIC_OFF)) &&
|
||||
CVarGetInteger("gEntranceTrackerHighlightPrevious", 0)) {
|
||||
CVarGetInteger(ENTRANCE_TRACKER_CVAR("HighlightPrevious"), 0)) {
|
||||
color = COLOR_ORANGE;
|
||||
} else if (LinkIsInArea(original) != -1) {
|
||||
if (CVarGetInteger("gEntranceTrackerHighlightAvailable", 0)) {
|
||||
if (CVarGetInteger(ENTRANCE_TRACKER_CVAR("HighlightAvailable"), 0)) {
|
||||
color = COLOR_GREEN;
|
||||
}
|
||||
|
||||
if (doAreaScroll) {
|
||||
doAreaScroll = false;
|
||||
if (CVarGetInteger("gEntranceTrackerAutoScroll", 0)) {
|
||||
if (CVarGetInteger(ENTRANCE_TRACKER_CVAR("AutoScroll"), 0)) {
|
||||
ImGui::SetScrollHereY(0.0f);
|
||||
}
|
||||
}
|
||||
|
@ -413,17 +413,17 @@ void DrawItemCount(ItemTrackerItem item, bool hideMax) {
|
||||
if (!GameInteractor::IsSaveLoaded()) {
|
||||
return;
|
||||
}
|
||||
int iconSize = CVarGetInteger("gItemTrackerIconSize", 36);
|
||||
int textSize = CVarGetInteger("gTrackers.ItemTracker.ItemTrackerTextSize", 13);
|
||||
int iconSize = CVarGetInteger(ITEM_TRACKER_CVAR("IconSize"), 36);
|
||||
int textSize = CVarGetInteger(ITEM_TRACKER_CVAR("TextSize"), 13);
|
||||
ItemTrackerNumbers currentAndMax = GetItemCurrentAndMax(item);
|
||||
ImVec2 p = ImGui::GetCursorScreenPos();
|
||||
int32_t trackerNumberDisplayMode = CVarGetInteger("gItemTrackerCapacityTrack", ITEM_TRACKER_NUMBER_CURRENT_CAPACITY_ONLY);
|
||||
int32_t trackerKeyNumberDisplayMode = CVarGetInteger("gItemTrackerKeyTrack", KEYS_COLLECTED_MAX);
|
||||
int32_t trackerNumberDisplayMode = CVarGetInteger(ITEM_TRACKER_CVAR("ItemCountType"), ITEM_TRACKER_NUMBER_CURRENT_CAPACITY_ONLY);
|
||||
int32_t trackerKeyNumberDisplayMode = CVarGetInteger(ITEM_TRACKER_CVAR("KeyCounts"), KEYS_COLLECTED_MAX);
|
||||
float textScalingFactor = static_cast<float>(iconSize) / 36.0f;
|
||||
uint32_t actualItemId = INV_CONTENT(item.id);
|
||||
bool hasItem = actualItemId != ITEM_NONE;
|
||||
|
||||
if (CVarGetInteger("gTrackers.ItemTracker.HookshotIdentifier", 0)) {
|
||||
if (CVarGetInteger(ITEM_TRACKER_CVAR("HookshotIdentifier"), 0)) {
|
||||
if ((actualItemId == ITEM_HOOKSHOT || actualItemId == ITEM_LONGSHOT) && hasItem) {
|
||||
|
||||
// Calculate the scaled position for the text
|
||||
@ -469,7 +469,7 @@ void DrawItemCount(ItemTrackerItem item, bool hideMax) {
|
||||
ImU32 currentColor = IM_COL_WHITE;
|
||||
ImU32 maxColor = item.id == QUEST_SKULL_TOKEN ? IM_COL_RED : IM_COL_GREEN;
|
||||
|
||||
bool shouldAlignToLeft = CVarGetInteger("gItemTrackerCurrentOnLeft", 0) &&
|
||||
bool shouldAlignToLeft = CVarGetInteger(ITEM_TRACKER_CVAR("ItemCountAlignLeft"), 0) &&
|
||||
trackerNumberDisplayMode != ITEM_TRACKER_NUMBER_CAPACITY &&
|
||||
trackerNumberDisplayMode != ITEM_TRACKER_NUMBER_AMMO;
|
||||
|
||||
@ -529,7 +529,7 @@ void DrawItemCount(ItemTrackerItem item, bool hideMax) {
|
||||
uint8_t piecesTotal = OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_TRIFORCE_HUNT_PIECES_TOTAL);
|
||||
ImU32 currentColor = gSaveContext.triforcePiecesCollected >= piecesRequired ? IM_COL_GREEN : IM_COL_WHITE;
|
||||
ImU32 maxColor = IM_COL_GREEN;
|
||||
int32_t trackerTriforcePieceNumberDisplayMode = CVarGetInteger("gItemTrackerTriforcePieceTrack", TRIFORCE_PIECE_COLLECTED_REQUIRED_MAX);
|
||||
int32_t trackerTriforcePieceNumberDisplayMode = CVarGetInteger(ITEM_TRACKER_CVAR("TriforcePieceCounts"), TRIFORCE_PIECE_COLLECTED_REQUIRED_MAX);
|
||||
|
||||
currentString += std::to_string(gSaveContext.triforcePiecesCollected);
|
||||
currentString += "/";
|
||||
@ -559,7 +559,7 @@ void DrawItemCount(ItemTrackerItem item, bool hideMax) {
|
||||
|
||||
void DrawEquip(ItemTrackerItem item) {
|
||||
bool hasEquip = HasEquipment(item);
|
||||
int iconSize = CVarGetInteger("gItemTrackerIconSize", 36);
|
||||
int iconSize = CVarGetInteger(ITEM_TRACKER_CVAR("IconSize"), 36);
|
||||
ImGui::Image(LUS::Context::GetInstance()->GetWindow()->GetGui()->GetTextureByName(hasEquip && IsValidSaveFile() ? item.name : item.nameFaded),
|
||||
ImVec2(iconSize, iconSize), ImVec2(0, 0), ImVec2(1, 1));
|
||||
|
||||
@ -568,7 +568,7 @@ void DrawEquip(ItemTrackerItem item) {
|
||||
|
||||
void DrawQuest(ItemTrackerItem item) {
|
||||
bool hasQuestItem = HasQuestItem(item);
|
||||
int iconSize = CVarGetInteger("gItemTrackerIconSize", 36);
|
||||
int iconSize = CVarGetInteger(ITEM_TRACKER_CVAR("IconSize"), 36);
|
||||
ImGui::BeginGroup();
|
||||
ImGui::Image(LUS::Context::GetInstance()->GetWindow()->GetGui()->GetTextureByName(hasQuestItem && IsValidSaveFile() ? item.name : item.nameFaded),
|
||||
ImVec2(iconSize, iconSize), ImVec2(0, 0), ImVec2(1, 1));
|
||||
@ -585,7 +585,7 @@ void DrawQuest(ItemTrackerItem item) {
|
||||
void DrawItem(ItemTrackerItem item) {
|
||||
|
||||
uint32_t actualItemId = GameInteractor::IsSaveLoaded() ? INV_CONTENT(item.id) : ITEM_NONE;
|
||||
int iconSize = CVarGetInteger("gItemTrackerIconSize", 36);
|
||||
int iconSize = CVarGetInteger(ITEM_TRACKER_CVAR("IconSize"), 36);
|
||||
bool hasItem = actualItemId != ITEM_NONE;
|
||||
std::string itemName = "";
|
||||
|
||||
@ -661,7 +661,7 @@ void DrawBottle(ItemTrackerItem item) {
|
||||
item = actualItemTrackerItemMap[actualItemId];
|
||||
}
|
||||
|
||||
int iconSize = CVarGetInteger("gItemTrackerIconSize", 36);
|
||||
int iconSize = CVarGetInteger(ITEM_TRACKER_CVAR("IconSize"), 36);
|
||||
ImGui::Image(LUS::Context::GetInstance()->GetWindow()->GetGui()->GetTextureByName(hasItem && IsValidSaveFile() ? item.name : item.nameFaded),
|
||||
ImVec2(iconSize, iconSize), ImVec2(0, 0), ImVec2(1, 1));
|
||||
|
||||
@ -672,7 +672,7 @@ void DrawDungeonItem(ItemTrackerItem item) {
|
||||
uint32_t itemId = item.id;
|
||||
ImU32 dungeonColor = IM_COL_WHITE;
|
||||
uint32_t bitMask = 1 << (item.id - ITEM_KEY_BOSS); // Bitset starts at ITEM_KEY_BOSS == 0. the rest are sequential
|
||||
int iconSize = CVarGetInteger("gItemTrackerIconSize", 36);
|
||||
int iconSize = CVarGetInteger(ITEM_TRACKER_CVAR("IconSize"), 36);
|
||||
bool hasItem = GameInteractor::IsSaveLoaded() ? (bitMask & gSaveContext.inventory.dungeonItems[item.data]) : false;
|
||||
bool hasSmallKey = GameInteractor::IsSaveLoaded() ? ((gSaveContext.inventory.dungeonKeys[item.data]) >= 0) : false;
|
||||
ImGui::BeginGroup();
|
||||
@ -718,7 +718,7 @@ void DrawDungeonItem(ItemTrackerItem item) {
|
||||
}
|
||||
|
||||
void DrawSong(ItemTrackerItem item) {
|
||||
int iconSize = CVarGetInteger("gItemTrackerIconSize", 36);
|
||||
int iconSize = CVarGetInteger(ITEM_TRACKER_CVAR("IconSize"), 36);
|
||||
ImVec2 p = ImGui::GetCursorScreenPos();
|
||||
bool hasSong = HasSong(item);
|
||||
ImGui::SetCursorScreenPos(ImVec2(p.x + 6, p.y));
|
||||
@ -729,8 +729,8 @@ void DrawSong(ItemTrackerItem item) {
|
||||
|
||||
void DrawNotes(bool resizeable = false) {
|
||||
ImGui::BeginGroup();
|
||||
int iconSize = CVarGetInteger("gItemTrackerIconSize", 36);
|
||||
int iconSpacing = CVarGetInteger("gItemTrackerIconSpacing", 12);
|
||||
int iconSize = CVarGetInteger(ITEM_TRACKER_CVAR("IconSize"), 36);
|
||||
int iconSpacing = CVarGetInteger(ITEM_TRACKER_CVAR("IconSpacing"), 12);
|
||||
|
||||
struct ItemTrackerNotes {
|
||||
static int TrackerNotesResizeCallback(ImGuiInputTextCallbackData* data) {
|
||||
@ -775,11 +775,11 @@ void BeginFloatingWindows(std::string UniqueName, ImGuiWindowFlags flags = 0) {
|
||||
windowFlags |= ImGuiWindowFlags_AlwaysAutoResize | ImGuiWindowFlags_NoFocusOnAppearing | ImGuiWindowFlags_NoResize;
|
||||
}
|
||||
|
||||
if (CVarGetInteger("gItemTrackerWindowType", TRACKER_WINDOW_FLOATING) == TRACKER_WINDOW_FLOATING) {
|
||||
if (CVarGetInteger(ITEM_TRACKER_CVAR("WindowType"), TRACKER_WINDOW_FLOATING) == TRACKER_WINDOW_FLOATING) {
|
||||
ImGui::SetNextWindowViewport(ImGui::GetMainViewport()->ID);
|
||||
windowFlags |= ImGuiWindowFlags_NoDocking | ImGuiWindowFlags_NoNav | ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoScrollWithMouse | ImGuiWindowFlags_NoScrollbar;
|
||||
|
||||
if (!CVarGetInteger("gItemTrackerHudEditMode", 0)) {
|
||||
if (!CVarGetInteger(ITEM_TRACKER_CVAR("Draggable"), 0)) {
|
||||
windowFlags |= ImGuiWindowFlags_NoInputs | ImGuiWindowFlags_NoMove;
|
||||
}
|
||||
}
|
||||
@ -800,9 +800,9 @@ void EndFloatingWindows() {
|
||||
* Takes in a vector of ItemTrackerItem and draws them in rows of N items
|
||||
*/
|
||||
void DrawItemsInRows(std::vector<ItemTrackerItem> items, int columns = 6) {
|
||||
int iconSize = CVarGetInteger("gItemTrackerIconSize", 36);
|
||||
int iconSpacing = CVarGetInteger("gItemTrackerIconSpacing", 12);
|
||||
int topPadding = (CVarGetInteger("gItemTrackerWindowType", TRACKER_WINDOW_FLOATING) == TRACKER_WINDOW_WINDOW) ? 20 : 0;
|
||||
int iconSize = CVarGetInteger(ITEM_TRACKER_CVAR("IconSize"), 36);
|
||||
int iconSpacing = CVarGetInteger(ITEM_TRACKER_CVAR("IconSpacing"), 12);
|
||||
int topPadding = (CVarGetInteger(ITEM_TRACKER_CVAR("WindowType"), TRACKER_WINDOW_FLOATING) == TRACKER_WINDOW_WINDOW) ? 20 : 0;
|
||||
|
||||
for (int i = 0; i < items.size(); i++) {
|
||||
int row = i / columns;
|
||||
@ -817,8 +817,8 @@ void DrawItemsInRows(std::vector<ItemTrackerItem> items, int columns = 6) {
|
||||
* Takes in a vector of ItemTrackerItem and draws them evenly spread across a circle
|
||||
*/
|
||||
void DrawItemsInACircle(std::vector<ItemTrackerItem> items) {
|
||||
int iconSize = CVarGetInteger("gItemTrackerIconSize", 36);
|
||||
int iconSpacing = CVarGetInteger("gItemTrackerIconSpacing", 12);
|
||||
int iconSize = CVarGetInteger(ITEM_TRACKER_CVAR("IconSize"), 36);
|
||||
int iconSpacing = CVarGetInteger(ITEM_TRACKER_CVAR("IconSpacing"), 12);
|
||||
|
||||
ImVec2 max = ImGui::GetWindowContentRegionMax();
|
||||
float radius = (iconSize + iconSpacing) * 2;
|
||||
@ -827,7 +827,7 @@ void DrawItemsInACircle(std::vector<ItemTrackerItem> items) {
|
||||
float angle = (float)i / items.size() * 2.0f * M_PI;
|
||||
float x = (radius / 2.0f) * cos(angle) + max.x / 2.0f;
|
||||
float y = (radius / 2.0f) * sin(angle) + max.y / 2.0f;
|
||||
ImGui::SetCursorPos(ImVec2(x - (CVarGetInteger("gItemTrackerIconSize", 36) - 8) / 2.0f, y + 4));
|
||||
ImGui::SetCursorPos(ImVec2(x - (CVarGetInteger(ITEM_TRACKER_CVAR("IconSize"), 36) - 8) / 2.0f, y + 4));
|
||||
items[i].drawFunc(items[i]);
|
||||
}
|
||||
}
|
||||
@ -838,8 +838,8 @@ void DrawItemsInACircle(std::vector<ItemTrackerItem> items) {
|
||||
* to then call DrawItemsInRows
|
||||
*/
|
||||
std::vector<ItemTrackerItem> GetDungeonItemsVector(std::vector<ItemTrackerDungeon> dungeons, int columns = 6) {
|
||||
int iconSize = CVarGetInteger("gItemTrackerIconSize", 36);
|
||||
int iconSpacing = CVarGetInteger("gItemTrackerIconSpacing", 12);
|
||||
int iconSize = CVarGetInteger(ITEM_TRACKER_CVAR("IconSize"), 36);
|
||||
int iconSpacing = CVarGetInteger(ITEM_TRACKER_CVAR("IconSpacing"), 12);
|
||||
std::vector<ItemTrackerItem> dungeonItems = {};
|
||||
|
||||
int rowCount = 0;
|
||||
@ -894,8 +894,8 @@ void UpdateVectors() {
|
||||
dungeonRewards.insert(dungeonRewards.end(), dungeonRewardMedallions.begin(), dungeonRewardMedallions.end());
|
||||
|
||||
dungeonItems.clear();
|
||||
if (CVarGetInteger("gItemTrackerDisplayDungeonItemsHorizontal", 1) && CVarGetInteger("gItemTrackerDungeonItemsDisplayType", SECTION_DISPLAY_HIDDEN) == SECTION_DISPLAY_SEPARATE) {
|
||||
if (CVarGetInteger("gItemTrackerDisplayDungeonItemsMaps", 1)) {
|
||||
if (CVarGetInteger(ITEM_TRACKER_CVAR("DungeonItems.Layout"), 1) && CVarGetInteger(ITEM_TRACKER_CVAR("DisplayType.DungeonItems"), SECTION_DISPLAY_HIDDEN) == SECTION_DISPLAY_SEPARATE) {
|
||||
if (CVarGetInteger(ITEM_TRACKER_CVAR("DungeonItems.DisplayMaps"), 1)) {
|
||||
dungeonItems = GetDungeonItemsVector(itemTrackerDungeonsWithMapsHorizontal, 12);
|
||||
// Manually adding Thieves Hideout to an open spot so we don't get an additional row for one item
|
||||
dungeonItems[23] = ITEM_TRACKER_ITEM(ITEM_KEY_SMALL, SCENE_THIEVES_HIDEOUT, DrawDungeonItem);
|
||||
@ -905,7 +905,7 @@ void UpdateVectors() {
|
||||
dungeonItems[15] = ITEM_TRACKER_ITEM(ITEM_KEY_SMALL, SCENE_THIEVES_HIDEOUT, DrawDungeonItem);
|
||||
}
|
||||
} else {
|
||||
if (CVarGetInteger("gItemTrackerDisplayDungeonItemsMaps", 1)) {
|
||||
if (CVarGetInteger(ITEM_TRACKER_CVAR("DungeonItems.DisplayMaps"), 1)) {
|
||||
dungeonItems = GetDungeonItemsVector(itemTrackerDungeonsWithMapsCompact);
|
||||
// Manually adding Thieves Hideout to an open spot so we don't get an additional row for one item
|
||||
dungeonItems[35] = ITEM_TRACKER_ITEM(ITEM_KEY_SMALL, SCENE_THIEVES_HIDEOUT, DrawDungeonItem);
|
||||
@ -915,37 +915,37 @@ void UpdateVectors() {
|
||||
}
|
||||
|
||||
mainWindowItems.clear();
|
||||
if (CVarGetInteger("gItemTrackerInventoryItemsDisplayType", SECTION_DISPLAY_MAIN_WINDOW) == SECTION_DISPLAY_MAIN_WINDOW) {
|
||||
if (CVarGetInteger(ITEM_TRACKER_CVAR("DisplayType.Inventory"), SECTION_DISPLAY_MAIN_WINDOW) == SECTION_DISPLAY_MAIN_WINDOW) {
|
||||
mainWindowItems.insert(mainWindowItems.end(), inventoryItems.begin(), inventoryItems.end());
|
||||
}
|
||||
if (CVarGetInteger("gItemTrackerEquipmentItemsDisplayType", SECTION_DISPLAY_MAIN_WINDOW) == SECTION_DISPLAY_MAIN_WINDOW) {
|
||||
if (CVarGetInteger(ITEM_TRACKER_CVAR("DisplayType.Equipment"), SECTION_DISPLAY_MAIN_WINDOW) == SECTION_DISPLAY_MAIN_WINDOW) {
|
||||
mainWindowItems.insert(mainWindowItems.end(), equipmentItems.begin(), equipmentItems.end());
|
||||
}
|
||||
if (CVarGetInteger("gItemTrackerMiscItemsDisplayType", SECTION_DISPLAY_MAIN_WINDOW) == SECTION_DISPLAY_MAIN_WINDOW) {
|
||||
if (CVarGetInteger(ITEM_TRACKER_CVAR("DisplayType.Misc"), SECTION_DISPLAY_MAIN_WINDOW) == SECTION_DISPLAY_MAIN_WINDOW) {
|
||||
mainWindowItems.insert(mainWindowItems.end(), miscItems.begin(), miscItems.end());
|
||||
}
|
||||
if (CVarGetInteger("gItemTrackerDungeonRewardsDisplayType", SECTION_DISPLAY_MAIN_WINDOW) == SECTION_DISPLAY_MAIN_WINDOW) {
|
||||
if (CVarGetInteger(ITEM_TRACKER_CVAR("DisplayType.DungeonRewards"), SECTION_DISPLAY_MAIN_WINDOW) == SECTION_DISPLAY_MAIN_WINDOW) {
|
||||
mainWindowItems.insert(mainWindowItems.end(), dungeonRewardStones.begin(), dungeonRewardStones.end());
|
||||
mainWindowItems.insert(mainWindowItems.end(), dungeonRewardMedallions.begin(), dungeonRewardMedallions.end());
|
||||
}
|
||||
if (CVarGetInteger("gItemTrackerSongsDisplayType", SECTION_DISPLAY_MAIN_WINDOW) == SECTION_DISPLAY_MAIN_WINDOW) {
|
||||
if (CVarGetInteger("gItemTrackerMiscItemsDisplayType", SECTION_DISPLAY_MAIN_WINDOW) == SECTION_DISPLAY_MAIN_WINDOW &&
|
||||
CVarGetInteger("gItemTrackerDungeonRewardsDisplayType", SECTION_DISPLAY_MAIN_WINDOW) != SECTION_DISPLAY_MAIN_WINDOW) {
|
||||
if (CVarGetInteger(ITEM_TRACKER_CVAR("DisplayType.Songs"), SECTION_DISPLAY_MAIN_WINDOW) == SECTION_DISPLAY_MAIN_WINDOW) {
|
||||
if (CVarGetInteger(ITEM_TRACKER_CVAR("DisplayType.Misc"), SECTION_DISPLAY_MAIN_WINDOW) == SECTION_DISPLAY_MAIN_WINDOW &&
|
||||
CVarGetInteger(ITEM_TRACKER_CVAR("DisplayType.DungeonRewards"), SECTION_DISPLAY_MAIN_WINDOW) != SECTION_DISPLAY_MAIN_WINDOW) {
|
||||
mainWindowItems.push_back(ITEM_TRACKER_ITEM(ITEM_NONE, 0, DrawItem));
|
||||
mainWindowItems.push_back(ITEM_TRACKER_ITEM(ITEM_NONE, 0, DrawItem));
|
||||
mainWindowItems.push_back(ITEM_TRACKER_ITEM(ITEM_NONE, 0, DrawItem));
|
||||
}
|
||||
mainWindowItems.insert(mainWindowItems.end(), songItems.begin(), songItems.end());
|
||||
}
|
||||
if (CVarGetInteger("gItemTrackerDungeonItemsDisplayType", SECTION_DISPLAY_HIDDEN) == SECTION_DISPLAY_MAIN_WINDOW) {
|
||||
if (CVarGetInteger(ITEM_TRACKER_CVAR("DisplayType.DungeonItems"), SECTION_DISPLAY_HIDDEN) == SECTION_DISPLAY_MAIN_WINDOW) {
|
||||
mainWindowItems.insert(mainWindowItems.end(), dungeonItems.begin(), dungeonItems.end());
|
||||
}
|
||||
|
||||
// if we're adding greg to the misc window,
|
||||
// and misc isn't on the main window,
|
||||
// and it doesn't already have greg, add him
|
||||
if (CVarGetInteger("gItemTrackerGregDisplayType", SECTION_DISPLAY_EXTENDED_HIDDEN) == SECTION_DISPLAY_EXTENDED_MISC_WINDOW &&
|
||||
CVarGetInteger("gItemTrackerMiscItemsDisplayType", SECTION_DISPLAY_MAIN_WINDOW) != SECTION_DISPLAY_MAIN_WINDOW &&
|
||||
if (CVarGetInteger(ITEM_TRACKER_CVAR("DisplayType.Greg"), SECTION_DISPLAY_EXTENDED_HIDDEN) == SECTION_DISPLAY_EXTENDED_MISC_WINDOW &&
|
||||
CVarGetInteger(ITEM_TRACKER_CVAR("DisplayType.Misc"), SECTION_DISPLAY_MAIN_WINDOW) != SECTION_DISPLAY_MAIN_WINDOW &&
|
||||
std::none_of(miscItems.begin(), miscItems.end(), [](ItemTrackerItem item){return item.id == ITEM_RUPEE_GREEN;})) {
|
||||
|
||||
miscItems.insert(miscItems.end(), gregItems.begin(), gregItems.end());
|
||||
@ -960,7 +960,7 @@ void UpdateVectors() {
|
||||
}
|
||||
|
||||
// if we're adding greg to the main window
|
||||
if (CVarGetInteger("gItemTrackerGregDisplayType", SECTION_DISPLAY_EXTENDED_HIDDEN) == SECTION_DISPLAY_EXTENDED_MAIN_WINDOW) {
|
||||
if (CVarGetInteger(ITEM_TRACKER_CVAR("DisplayType.Greg"), SECTION_DISPLAY_EXTENDED_HIDDEN) == SECTION_DISPLAY_EXTENDED_MAIN_WINDOW) {
|
||||
// insert empty items until we're on a new row for greg
|
||||
while (mainWindowItems.size() % 6) {
|
||||
mainWindowItems.push_back(ITEM_TRACKER_ITEM(ITEM_NONE, 0, DrawItem));
|
||||
@ -971,9 +971,9 @@ void UpdateVectors() {
|
||||
}
|
||||
|
||||
// If we're adding triforce pieces to the main window
|
||||
if (CVarGetInteger("gItemTrackerTriforcePiecesDisplayType", SECTION_DISPLAY_HIDDEN) == SECTION_DISPLAY_MAIN_WINDOW) {
|
||||
if (CVarGetInteger(ITEM_TRACKER_CVAR("DisplayType.TriforcePieces"), SECTION_DISPLAY_HIDDEN) == SECTION_DISPLAY_MAIN_WINDOW) {
|
||||
// If Greg isn't on the main window, add empty items to place the triforce pieces on a new row.
|
||||
if (CVarGetInteger("gItemTrackerGregDisplayType", SECTION_DISPLAY_EXTENDED_HIDDEN) != SECTION_DISPLAY_EXTENDED_MAIN_WINDOW) {
|
||||
if (CVarGetInteger(ITEM_TRACKER_CVAR("DisplayType.Greg"), SECTION_DISPLAY_EXTENDED_HIDDEN) != SECTION_DISPLAY_EXTENDED_MAIN_WINDOW) {
|
||||
while (mainWindowItems.size() % 6) {
|
||||
mainWindowItems.push_back(ITEM_TRACKER_ITEM(ITEM_NONE, 0, DrawItem));
|
||||
}
|
||||
@ -1009,56 +1009,56 @@ void ItemTrackerLoadFile() {
|
||||
void ItemTrackerWindow::DrawElement() {
|
||||
UpdateVectors();
|
||||
|
||||
int iconSize = CVarGetInteger("gItemTrackerIconSize", 36);
|
||||
int iconSpacing = CVarGetInteger("gItemTrackerIconSpacing", 12);
|
||||
int comboButton1Mask = buttonMap[CVarGetInteger("gItemTrackerComboButton1", TRACKER_COMBO_BUTTON_L)];
|
||||
int comboButton2Mask = buttonMap[CVarGetInteger("gItemTrackerComboButton2", TRACKER_COMBO_BUTTON_R)];
|
||||
int iconSize = CVarGetInteger(ITEM_TRACKER_CVAR("IconSize"), 36);
|
||||
int iconSpacing = CVarGetInteger(ITEM_TRACKER_CVAR("IconSpacing"), 12);
|
||||
int comboButton1Mask = buttonMap[CVarGetInteger(ITEM_TRACKER_CVAR("ComboButton1"), TRACKER_COMBO_BUTTON_L)];
|
||||
int comboButton2Mask = buttonMap[CVarGetInteger(ITEM_TRACKER_CVAR("ComboButton2"), TRACKER_COMBO_BUTTON_R)];
|
||||
OSContPad* buttonsPressed = LUS::Context::GetInstance()->GetControlDeck()->GetPads();
|
||||
bool comboButtonsHeld = buttonsPressed != nullptr && buttonsPressed[0].button & comboButton1Mask && buttonsPressed[0].button & comboButton2Mask;
|
||||
bool isPaused = CVarGetInteger("gItemTrackerShowOnlyPaused", 0) == 0 || gPlayState != nullptr && gPlayState->pauseCtx.state > 0;
|
||||
bool isPaused = CVarGetInteger(ITEM_TRACKER_CVAR("ShowOnlyPaused"), 0) == 0 || gPlayState != nullptr && gPlayState->pauseCtx.state > 0;
|
||||
|
||||
if (CVarGetInteger("gItemTrackerWindowType", TRACKER_WINDOW_FLOATING) == TRACKER_WINDOW_WINDOW || isPaused && (CVarGetInteger("gItemTrackerDisplayType", TRACKER_DISPLAY_ALWAYS) == TRACKER_DISPLAY_ALWAYS ? CVarGetInteger("gItemTrackerEnabled", 0) : comboButtonsHeld)) {
|
||||
if (CVarGetInteger(ITEM_TRACKER_CVAR("WindowType"), TRACKER_WINDOW_FLOATING) == TRACKER_WINDOW_WINDOW || isPaused && (CVarGetInteger(ITEM_TRACKER_CVAR("DisplayType.Main"), TRACKER_DISPLAY_ALWAYS) == TRACKER_DISPLAY_ALWAYS ? CVarGetInteger(WINDOW_CVAR("ItemTracker"), 0) : comboButtonsHeld)) {
|
||||
if (
|
||||
(CVarGetInteger("gItemTrackerInventoryItemsDisplayType", SECTION_DISPLAY_MAIN_WINDOW) == SECTION_DISPLAY_MAIN_WINDOW) ||
|
||||
(CVarGetInteger("gItemTrackerEquipmentItemsDisplayType", SECTION_DISPLAY_MAIN_WINDOW) == SECTION_DISPLAY_MAIN_WINDOW) ||
|
||||
(CVarGetInteger("gItemTrackerMiscItemsDisplayType", SECTION_DISPLAY_MAIN_WINDOW) == SECTION_DISPLAY_MAIN_WINDOW) ||
|
||||
(CVarGetInteger("gItemTrackerDungeonRewardsDisplayType", SECTION_DISPLAY_MAIN_WINDOW) == SECTION_DISPLAY_MAIN_WINDOW) ||
|
||||
(CVarGetInteger("gItemTrackerSongsDisplayType", SECTION_DISPLAY_MAIN_WINDOW) == SECTION_DISPLAY_MAIN_WINDOW) ||
|
||||
(CVarGetInteger("gItemTrackerDungeonItemsDisplayType", SECTION_DISPLAY_HIDDEN) == SECTION_DISPLAY_MAIN_WINDOW) ||
|
||||
(CVarGetInteger("gItemTrackerGregDisplayType", SECTION_DISPLAY_EXTENDED_HIDDEN) == SECTION_DISPLAY_EXTENDED_MAIN_WINDOW) ||
|
||||
(CVarGetInteger("gItemTrackerTriforcePiecesDisplayType", SECTION_DISPLAY_HIDDEN) == SECTION_DISPLAY_MAIN_WINDOW) ||
|
||||
(CVarGetInteger("gItemTrackerNotesDisplayType", SECTION_DISPLAY_HIDDEN) == SECTION_DISPLAY_MAIN_WINDOW)
|
||||
(CVarGetInteger(ITEM_TRACKER_CVAR("DisplayType.Inventory"), SECTION_DISPLAY_MAIN_WINDOW) == SECTION_DISPLAY_MAIN_WINDOW) ||
|
||||
(CVarGetInteger(ITEM_TRACKER_CVAR("DisplayType.Equipment"), SECTION_DISPLAY_MAIN_WINDOW) == SECTION_DISPLAY_MAIN_WINDOW) ||
|
||||
(CVarGetInteger(ITEM_TRACKER_CVAR("DisplayType.Misc"), SECTION_DISPLAY_MAIN_WINDOW) == SECTION_DISPLAY_MAIN_WINDOW) ||
|
||||
(CVarGetInteger(ITEM_TRACKER_CVAR("DisplayType.DungeonRewards"), SECTION_DISPLAY_MAIN_WINDOW) == SECTION_DISPLAY_MAIN_WINDOW) ||
|
||||
(CVarGetInteger(ITEM_TRACKER_CVAR("DisplayType.Songs"), SECTION_DISPLAY_MAIN_WINDOW) == SECTION_DISPLAY_MAIN_WINDOW) ||
|
||||
(CVarGetInteger(ITEM_TRACKER_CVAR("DisplayType.DungeonItems"), SECTION_DISPLAY_HIDDEN) == SECTION_DISPLAY_MAIN_WINDOW) ||
|
||||
(CVarGetInteger(ITEM_TRACKER_CVAR("DisplayType.Greg"), SECTION_DISPLAY_EXTENDED_HIDDEN) == SECTION_DISPLAY_EXTENDED_MAIN_WINDOW) ||
|
||||
(CVarGetInteger(ITEM_TRACKER_CVAR("DisplayType.TriforcePieces"), SECTION_DISPLAY_HIDDEN) == SECTION_DISPLAY_MAIN_WINDOW) ||
|
||||
(CVarGetInteger(ITEM_TRACKER_CVAR("DisplayType.Notes"), SECTION_DISPLAY_HIDDEN) == SECTION_DISPLAY_MAIN_WINDOW)
|
||||
) {
|
||||
BeginFloatingWindows("Item Tracker##main window");
|
||||
DrawItemsInRows(mainWindowItems, 6);
|
||||
|
||||
if (CVarGetInteger("gItemTrackerNotesDisplayType", SECTION_DISPLAY_HIDDEN) == SECTION_DISPLAY_MAIN_WINDOW && CVarGetInteger("gItemTrackerDisplayType", TRACKER_DISPLAY_ALWAYS) == TRACKER_DISPLAY_ALWAYS) {
|
||||
if (CVarGetInteger(ITEM_TRACKER_CVAR("DisplayType.Notes"), SECTION_DISPLAY_HIDDEN) == SECTION_DISPLAY_MAIN_WINDOW && CVarGetInteger(ITEM_TRACKER_CVAR("DisplayType.Main"), TRACKER_DISPLAY_ALWAYS) == TRACKER_DISPLAY_ALWAYS) {
|
||||
DrawNotes();
|
||||
}
|
||||
EndFloatingWindows();
|
||||
}
|
||||
|
||||
if (CVarGetInteger("gItemTrackerInventoryItemsDisplayType", SECTION_DISPLAY_MAIN_WINDOW) == SECTION_DISPLAY_SEPARATE) {
|
||||
if (CVarGetInteger(ITEM_TRACKER_CVAR("DisplayType.Inventory"), SECTION_DISPLAY_MAIN_WINDOW) == SECTION_DISPLAY_SEPARATE) {
|
||||
BeginFloatingWindows("Inventory Items Tracker");
|
||||
DrawItemsInRows(inventoryItems);
|
||||
EndFloatingWindows();
|
||||
}
|
||||
|
||||
if (CVarGetInteger("gItemTrackerEquipmentItemsDisplayType", SECTION_DISPLAY_MAIN_WINDOW) == SECTION_DISPLAY_SEPARATE) {
|
||||
if (CVarGetInteger(ITEM_TRACKER_CVAR("DisplayType.Equipment"), SECTION_DISPLAY_MAIN_WINDOW) == SECTION_DISPLAY_SEPARATE) {
|
||||
BeginFloatingWindows("Equipment Items Tracker");
|
||||
DrawItemsInRows(equipmentItems, 3);
|
||||
EndFloatingWindows();
|
||||
}
|
||||
|
||||
if (CVarGetInteger("gItemTrackerMiscItemsDisplayType", SECTION_DISPLAY_MAIN_WINDOW) == SECTION_DISPLAY_SEPARATE) {
|
||||
if (CVarGetInteger(ITEM_TRACKER_CVAR("DisplayType.Misc"), SECTION_DISPLAY_MAIN_WINDOW) == SECTION_DISPLAY_SEPARATE) {
|
||||
BeginFloatingWindows("Misc Items Tracker");
|
||||
DrawItemsInRows(miscItems, 4);
|
||||
EndFloatingWindows();
|
||||
}
|
||||
|
||||
if (CVarGetInteger("gItemTrackerDungeonRewardsDisplayType", SECTION_DISPLAY_MAIN_WINDOW) == SECTION_DISPLAY_SEPARATE) {
|
||||
if (CVarGetInteger(ITEM_TRACKER_CVAR("DisplayType.DungeonRewards"), SECTION_DISPLAY_MAIN_WINDOW) == SECTION_DISPLAY_SEPARATE) {
|
||||
BeginFloatingWindows("Dungeon Rewards Tracker");
|
||||
if (CVarGetInteger("gItemTrackerDungeonRewardsCircle", 0)) {
|
||||
if (CVarGetInteger(ITEM_TRACKER_CVAR("DungeonRewardsLayout"), 0)) {
|
||||
ImGui::BeginGroup();
|
||||
DrawItemsInACircle(dungeonRewardMedallions);
|
||||
ImGui::EndGroup();
|
||||
@ -1071,16 +1071,16 @@ void ItemTrackerWindow::DrawElement() {
|
||||
EndFloatingWindows();
|
||||
}
|
||||
|
||||
if (CVarGetInteger("gItemTrackerSongsDisplayType", SECTION_DISPLAY_MAIN_WINDOW) == SECTION_DISPLAY_SEPARATE) {
|
||||
if (CVarGetInteger(ITEM_TRACKER_CVAR("DisplayType.Songs"), SECTION_DISPLAY_MAIN_WINDOW) == SECTION_DISPLAY_SEPARATE) {
|
||||
BeginFloatingWindows("Songs Tracker");
|
||||
DrawItemsInRows(songItems);
|
||||
EndFloatingWindows();
|
||||
}
|
||||
|
||||
if (CVarGetInteger("gItemTrackerDungeonItemsDisplayType", SECTION_DISPLAY_HIDDEN) == SECTION_DISPLAY_SEPARATE) {
|
||||
if (CVarGetInteger(ITEM_TRACKER_CVAR("DisplayType.DungeonItems"), SECTION_DISPLAY_HIDDEN) == SECTION_DISPLAY_SEPARATE) {
|
||||
BeginFloatingWindows("Dungeon Items Tracker");
|
||||
if (CVarGetInteger("gItemTrackerDisplayDungeonItemsHorizontal", 1)) {
|
||||
if (CVarGetInteger("gItemTrackerDisplayDungeonItemsMaps", 1)) {
|
||||
if (CVarGetInteger(ITEM_TRACKER_CVAR("DungeonItems.Layout"), 1)) {
|
||||
if (CVarGetInteger(ITEM_TRACKER_CVAR("DungeonItems.DisplayMaps"), 1)) {
|
||||
DrawItemsInRows(dungeonItems, 12);
|
||||
} else {
|
||||
DrawItemsInRows(dungeonItems, 8);
|
||||
@ -1091,19 +1091,19 @@ void ItemTrackerWindow::DrawElement() {
|
||||
EndFloatingWindows();
|
||||
}
|
||||
|
||||
if (CVarGetInteger("gItemTrackerGregDisplayType", SECTION_DISPLAY_EXTENDED_HIDDEN) == SECTION_DISPLAY_EXTENDED_SEPARATE) {
|
||||
if (CVarGetInteger(ITEM_TRACKER_CVAR("DisplayType.Greg"), SECTION_DISPLAY_EXTENDED_HIDDEN) == SECTION_DISPLAY_EXTENDED_SEPARATE) {
|
||||
BeginFloatingWindows("Greg Tracker");
|
||||
DrawItemsInRows(gregItems);
|
||||
EndFloatingWindows();
|
||||
}
|
||||
|
||||
if (CVarGetInteger("gItemTrackerTriforcePiecesDisplayType", SECTION_DISPLAY_HIDDEN) == SECTION_DISPLAY_SEPARATE) {
|
||||
if (CVarGetInteger(ITEM_TRACKER_CVAR("DisplayType.TriforcePieces"), SECTION_DISPLAY_HIDDEN) == SECTION_DISPLAY_SEPARATE) {
|
||||
BeginFloatingWindows("Triforce Piece Tracker");
|
||||
DrawItemsInRows(triforcePieces);
|
||||
EndFloatingWindows();
|
||||
}
|
||||
|
||||
if (CVarGetInteger("gItemTrackerNotesDisplayType", SECTION_DISPLAY_HIDDEN) == SECTION_DISPLAY_SEPARATE && CVarGetInteger("gItemTrackerDisplayType", TRACKER_DISPLAY_ALWAYS) == TRACKER_DISPLAY_ALWAYS) {
|
||||
if (CVarGetInteger(ITEM_TRACKER_CVAR("DisplayType.Notes"), SECTION_DISPLAY_HIDDEN) == SECTION_DISPLAY_SEPARATE && CVarGetInteger(ITEM_TRACKER_CVAR("DisplayType.Main"), TRACKER_DISPLAY_ALWAYS) == TRACKER_DISPLAY_ALWAYS) {
|
||||
ImGui::SetNextWindowSize(ImVec2(400,300), ImGuiCond_FirstUseEver);
|
||||
BeginFloatingWindows("Personal Notes", ImGuiWindowFlags_NoFocusOnAppearing);
|
||||
DrawNotes(true);
|
||||
@ -1140,50 +1140,50 @@ void ItemTrackerSettingsWindow::DrawElement() {
|
||||
ImGui::SameLine();
|
||||
ImGui::PushItemWidth(ImGui::GetContentRegionAvail().x);
|
||||
if (ImGui::ColorEdit4("BG Color##gItemTrackerBgColor", (float*)&ChromaKeyBackground, ImGuiColorEditFlags_AlphaPreview | ImGuiColorEditFlags_AlphaBar | ImGuiColorEditFlags_NoLabel)) {
|
||||
CVarSetFloat("gItemTrackerBgColorR", ChromaKeyBackground.x);
|
||||
CVarSetFloat("gItemTrackerBgColorG", ChromaKeyBackground.y);
|
||||
CVarSetFloat("gItemTrackerBgColorB", ChromaKeyBackground.z);
|
||||
CVarSetFloat("gItemTrackerBgColorA", ChromaKeyBackground.w);
|
||||
CVarSetFloat(ITEM_TRACKER_CVAR("BgColorR"), ChromaKeyBackground.x);
|
||||
CVarSetFloat(ITEM_TRACKER_CVAR("BgColorG"), ChromaKeyBackground.y);
|
||||
CVarSetFloat(ITEM_TRACKER_CVAR("BgColorB"), ChromaKeyBackground.z);
|
||||
CVarSetFloat(ITEM_TRACKER_CVAR("BgColorA"), ChromaKeyBackground.w);
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
}
|
||||
ImGui::PopItemWidth();
|
||||
|
||||
if (UIWidgets::LabeledRightAlignedEnhancementCombobox("Window Type", "gItemTrackerWindowType", windowTypes, TRACKER_WINDOW_FLOATING)) {
|
||||
if (UIWidgets::LabeledRightAlignedEnhancementCombobox("Window Type", ITEM_TRACKER_CVAR("WindowType"), windowTypes, TRACKER_WINDOW_FLOATING)) {
|
||||
shouldUpdateVectors = true;
|
||||
}
|
||||
|
||||
if (CVarGetInteger("gItemTrackerWindowType", TRACKER_WINDOW_FLOATING) == TRACKER_WINDOW_FLOATING) {
|
||||
if (UIWidgets::PaddedEnhancementCheckbox("Enable Dragging", "gItemTrackerHudEditMode")) {
|
||||
if (CVarGetInteger(ITEM_TRACKER_CVAR("WindowType"), TRACKER_WINDOW_FLOATING) == TRACKER_WINDOW_FLOATING) {
|
||||
if (UIWidgets::PaddedEnhancementCheckbox("Enable Dragging", ITEM_TRACKER_CVAR("Draggable"))) {
|
||||
shouldUpdateVectors = true;
|
||||
}
|
||||
if (UIWidgets::PaddedEnhancementCheckbox("Only enable while paused", "gItemTrackerShowOnlyPaused")) {
|
||||
if (UIWidgets::PaddedEnhancementCheckbox("Only enable while paused", ITEM_TRACKER_CVAR("ShowOnlyPaused"))) {
|
||||
shouldUpdateVectors = true;
|
||||
}
|
||||
if (UIWidgets::LabeledRightAlignedEnhancementCombobox("Display Mode", "gItemTrackerDisplayType", displayModes, TRACKER_DISPLAY_ALWAYS)) {
|
||||
if (UIWidgets::LabeledRightAlignedEnhancementCombobox("Display Mode", ITEM_TRACKER_CVAR("DisplayType.Main"), displayModes, TRACKER_DISPLAY_ALWAYS)) {
|
||||
shouldUpdateVectors = true;
|
||||
}
|
||||
if (CVarGetInteger("gItemTrackerDisplayType", TRACKER_DISPLAY_ALWAYS) == TRACKER_DISPLAY_COMBO_BUTTON) {
|
||||
if (UIWidgets::LabeledRightAlignedEnhancementCombobox("Combo Button 1", "gItemTrackerComboButton1", buttons, TRACKER_COMBO_BUTTON_L)) {
|
||||
if (CVarGetInteger(ITEM_TRACKER_CVAR("DisplayType.Main"), TRACKER_DISPLAY_ALWAYS) == TRACKER_DISPLAY_COMBO_BUTTON) {
|
||||
if (UIWidgets::LabeledRightAlignedEnhancementCombobox("Combo Button 1", ITEM_TRACKER_CVAR("ComboButton1"), buttons, TRACKER_COMBO_BUTTON_L)) {
|
||||
shouldUpdateVectors = true;
|
||||
}
|
||||
if (UIWidgets::LabeledRightAlignedEnhancementCombobox("Combo Button 2", "gItemTrackerComboButton2", buttons, TRACKER_COMBO_BUTTON_R)) {
|
||||
if (UIWidgets::LabeledRightAlignedEnhancementCombobox("Combo Button 2", ITEM_TRACKER_CVAR("ComboButton2"), buttons, TRACKER_COMBO_BUTTON_R)) {
|
||||
shouldUpdateVectors = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
UIWidgets::PaddedSeparator();
|
||||
UIWidgets::EnhancementSliderInt("Icon size : %dpx", "##ITEMTRACKERICONSIZE", "gItemTrackerIconSize", 25, 128, "", 36);
|
||||
UIWidgets::EnhancementSliderInt("Icon margins : %dpx", "##ITEMTRACKERSPACING", "gItemTrackerIconSpacing", -5, 50, "", 12);
|
||||
UIWidgets::EnhancementSliderInt("Text size : %dpx", "##ITEMTRACKERTEXTSIZE", "gTrackers.ItemTracker.ItemTrackerTextSize", 1, 30, "", 13);
|
||||
UIWidgets::EnhancementSliderInt("Icon size : %dpx", "##ITEMTRACKERICONSIZE", ITEM_TRACKER_CVAR("IconSize"), 25, 128, "", 36);
|
||||
UIWidgets::EnhancementSliderInt("Icon margins : %dpx", "##ITEMTRACKERSPACING", ITEM_TRACKER_CVAR("IconSpacing"), -5, 50, "", 12);
|
||||
UIWidgets::EnhancementSliderInt("Text size : %dpx", "##ITEMTRACKERTEXTSIZE", ITEM_TRACKER_CVAR("TextSize"), 1, 30, "", 13);
|
||||
|
||||
UIWidgets::Spacer(0);
|
||||
|
||||
ImGui::Text("Ammo/Capacity Tracking");
|
||||
UIWidgets::EnhancementCombobox("gItemTrackerCapacityTrack", itemTrackerCapacityTrackOptions, ITEM_TRACKER_NUMBER_CURRENT_CAPACITY_ONLY);
|
||||
UIWidgets::EnhancementCombobox(ITEM_TRACKER_CVAR("ItemCountType"), itemTrackerCapacityTrackOptions, ITEM_TRACKER_NUMBER_CURRENT_CAPACITY_ONLY);
|
||||
UIWidgets::InsertHelpHoverText("Customize what the numbers under each item are tracking."
|
||||
"\n\nNote: items without capacity upgrades will track ammo even in capacity mode");
|
||||
if (CVarGetInteger("gItemTrackerCapacityTrack", ITEM_TRACKER_NUMBER_CURRENT_CAPACITY_ONLY) == ITEM_TRACKER_NUMBER_CURRENT_CAPACITY_ONLY || CVarGetInteger("gItemTrackerCapacityTrack", ITEM_TRACKER_NUMBER_CURRENT_CAPACITY_ONLY) == ITEM_TRACKER_NUMBER_CURRENT_AMMO_ONLY) {
|
||||
if (UIWidgets::PaddedEnhancementCheckbox("Align count to left side", "gItemTrackerCurrentOnLeft")) {
|
||||
if (CVarGetInteger(ITEM_TRACKER_CVAR("ItemCountType"), ITEM_TRACKER_NUMBER_CURRENT_CAPACITY_ONLY) == ITEM_TRACKER_NUMBER_CURRENT_CAPACITY_ONLY || CVarGetInteger(ITEM_TRACKER_CVAR("ItemCountType"), ITEM_TRACKER_NUMBER_CURRENT_CAPACITY_ONLY) == ITEM_TRACKER_NUMBER_CURRENT_AMMO_ONLY) {
|
||||
if (UIWidgets::PaddedEnhancementCheckbox("Align count to left side", ITEM_TRACKER_CVAR("ItemCountAlignLeft"))) {
|
||||
shouldUpdateVectors = true;
|
||||
}
|
||||
}
|
||||
@ -1191,64 +1191,64 @@ void ItemTrackerSettingsWindow::DrawElement() {
|
||||
UIWidgets::Spacer(0);
|
||||
|
||||
ImGui::Text("Key Count Tracking");
|
||||
UIWidgets::EnhancementCombobox("gItemTrackerKeyTrack", itemTrackerKeyTrackOptions, KEYS_COLLECTED_MAX);
|
||||
UIWidgets::EnhancementCombobox(ITEM_TRACKER_CVAR("KeyCounts"), itemTrackerKeyTrackOptions, KEYS_COLLECTED_MAX);
|
||||
UIWidgets::InsertHelpHoverText("Customize what numbers are shown for key tracking.");
|
||||
|
||||
UIWidgets::Spacer(0);
|
||||
|
||||
ImGui::Text("Triforce Piece Count Tracking");
|
||||
UIWidgets::EnhancementCombobox("gItemTrackerTriforcePieceTrack", itemTrackerTriforcePieceTrackOptions, TRIFORCE_PIECE_COLLECTED_REQUIRED_MAX);
|
||||
UIWidgets::EnhancementCombobox(ITEM_TRACKER_CVAR("TriforcePieceCounts"), itemTrackerTriforcePieceTrackOptions, TRIFORCE_PIECE_COLLECTED_REQUIRED_MAX);
|
||||
UIWidgets::InsertHelpHoverText("Customize what numbers are shown for triforce piece tracking.");
|
||||
|
||||
ImGui::TableNextColumn();
|
||||
|
||||
if (UIWidgets::LabeledRightAlignedEnhancementCombobox("Inventory", "gItemTrackerInventoryItemsDisplayType", displayTypes, SECTION_DISPLAY_MAIN_WINDOW)) {
|
||||
if (UIWidgets::LabeledRightAlignedEnhancementCombobox("Inventory", ITEM_TRACKER_CVAR("DisplayType.Inventory"), displayTypes, SECTION_DISPLAY_MAIN_WINDOW)) {
|
||||
shouldUpdateVectors = true;
|
||||
}
|
||||
if (UIWidgets::LabeledRightAlignedEnhancementCombobox("Equipment", "gItemTrackerEquipmentItemsDisplayType", displayTypes, SECTION_DISPLAY_MAIN_WINDOW)) {
|
||||
if (UIWidgets::LabeledRightAlignedEnhancementCombobox("Equipment", ITEM_TRACKER_CVAR("DisplayType.Equipment"), displayTypes, SECTION_DISPLAY_MAIN_WINDOW)) {
|
||||
shouldUpdateVectors = true;
|
||||
}
|
||||
if (UIWidgets::LabeledRightAlignedEnhancementCombobox("Misc", "gItemTrackerMiscItemsDisplayType", displayTypes, SECTION_DISPLAY_MAIN_WINDOW)) {
|
||||
if (UIWidgets::LabeledRightAlignedEnhancementCombobox("Misc", ITEM_TRACKER_CVAR("DisplayType.Misc"), displayTypes, SECTION_DISPLAY_MAIN_WINDOW)) {
|
||||
shouldUpdateVectors = true;
|
||||
}
|
||||
if (UIWidgets::LabeledRightAlignedEnhancementCombobox("Dungeon Rewards", "gItemTrackerDungeonRewardsDisplayType", displayTypes, SECTION_DISPLAY_MAIN_WINDOW)) {
|
||||
if (UIWidgets::LabeledRightAlignedEnhancementCombobox("Dungeon Rewards", ITEM_TRACKER_CVAR("DisplayType.DungeonRewards"), displayTypes, SECTION_DISPLAY_MAIN_WINDOW)) {
|
||||
shouldUpdateVectors = true;
|
||||
}
|
||||
if (CVarGetInteger("gItemTrackerDungeonRewardsDisplayType", SECTION_DISPLAY_MAIN_WINDOW) == SECTION_DISPLAY_SEPARATE) {
|
||||
if (UIWidgets::PaddedEnhancementCheckbox("Circle display", "gItemTrackerDungeonRewardsCircle", true, true, false, "", UIWidgets::CheckboxGraphics::Cross, false)) {
|
||||
if (CVarGetInteger(ITEM_TRACKER_CVAR("DisplayType.DungeonRewards"), SECTION_DISPLAY_MAIN_WINDOW) == SECTION_DISPLAY_SEPARATE) {
|
||||
if (UIWidgets::PaddedEnhancementCheckbox("Circle display", ITEM_TRACKER_CVAR("DungeonRewardsLayout"), true, true, false, "", UIWidgets::CheckboxGraphics::Cross, false)) {
|
||||
shouldUpdateVectors = true;
|
||||
}
|
||||
}
|
||||
if (UIWidgets::LabeledRightAlignedEnhancementCombobox("Songs", "gItemTrackerSongsDisplayType", displayTypes, SECTION_DISPLAY_MAIN_WINDOW)) {
|
||||
if (UIWidgets::LabeledRightAlignedEnhancementCombobox("Songs", ITEM_TRACKER_CVAR("DisplayType.Songs"), displayTypes, SECTION_DISPLAY_MAIN_WINDOW)) {
|
||||
shouldUpdateVectors = true;
|
||||
}
|
||||
if (UIWidgets::LabeledRightAlignedEnhancementCombobox("Dungeon Items", "gItemTrackerDungeonItemsDisplayType", displayTypes, SECTION_DISPLAY_HIDDEN)) {
|
||||
if (UIWidgets::LabeledRightAlignedEnhancementCombobox("Dungeon Items", ITEM_TRACKER_CVAR("DisplayType.DungeonItems"), displayTypes, SECTION_DISPLAY_HIDDEN)) {
|
||||
shouldUpdateVectors = true;
|
||||
}
|
||||
if (CVarGetInteger("gItemTrackerDungeonItemsDisplayType", SECTION_DISPLAY_HIDDEN) != SECTION_DISPLAY_HIDDEN) {
|
||||
if (CVarGetInteger("gItemTrackerDungeonItemsDisplayType", SECTION_DISPLAY_HIDDEN) == SECTION_DISPLAY_SEPARATE) {
|
||||
if (UIWidgets::PaddedEnhancementCheckbox("Horizontal display", "gItemTrackerDisplayDungeonItemsHorizontal", true, true, false, "", UIWidgets::CheckboxGraphics::Cross, true)) {
|
||||
if (CVarGetInteger(ITEM_TRACKER_CVAR("DisplayType.DungeonItems"), SECTION_DISPLAY_HIDDEN) != SECTION_DISPLAY_HIDDEN) {
|
||||
if (CVarGetInteger(ITEM_TRACKER_CVAR("DisplayType.DungeonItems"), SECTION_DISPLAY_HIDDEN) == SECTION_DISPLAY_SEPARATE) {
|
||||
if (UIWidgets::PaddedEnhancementCheckbox("Horizontal display", ITEM_TRACKER_CVAR("DungeonItems.Layout"), true, true, false, "", UIWidgets::CheckboxGraphics::Cross, true)) {
|
||||
shouldUpdateVectors = true;
|
||||
}
|
||||
}
|
||||
if (UIWidgets::PaddedEnhancementCheckbox("Maps and compasses", "gItemTrackerDisplayDungeonItemsMaps", true, true, false, "", UIWidgets::CheckboxGraphics::Cross, true)) {
|
||||
if (UIWidgets::PaddedEnhancementCheckbox("Maps and compasses", ITEM_TRACKER_CVAR("DungeonItems.DisplayMaps"), true, true, false, "", UIWidgets::CheckboxGraphics::Cross, true)) {
|
||||
shouldUpdateVectors = true;
|
||||
}
|
||||
}
|
||||
if (UIWidgets::LabeledRightAlignedEnhancementCombobox("Greg", "gItemTrackerGregDisplayType", extendedDisplayTypes, SECTION_DISPLAY_EXTENDED_HIDDEN)) {
|
||||
if (UIWidgets::LabeledRightAlignedEnhancementCombobox("Greg", ITEM_TRACKER_CVAR("DisplayType.Greg"), extendedDisplayTypes, SECTION_DISPLAY_EXTENDED_HIDDEN)) {
|
||||
shouldUpdateVectors = true;
|
||||
}
|
||||
|
||||
if (UIWidgets::LabeledRightAlignedEnhancementCombobox("Triforce Pieces", "gItemTrackerTriforcePiecesDisplayType", displayTypes, SECTION_DISPLAY_HIDDEN)) {
|
||||
if (UIWidgets::LabeledRightAlignedEnhancementCombobox("Triforce Pieces", ITEM_TRACKER_CVAR("DisplayType.TriforcePieces"), displayTypes, SECTION_DISPLAY_HIDDEN)) {
|
||||
shouldUpdateVectors = true;
|
||||
}
|
||||
|
||||
if (CVarGetInteger("gItemTrackerDisplayType", TRACKER_DISPLAY_ALWAYS) == TRACKER_DISPLAY_ALWAYS) {
|
||||
if (UIWidgets::LabeledRightAlignedEnhancementCombobox("Personal notes", "gItemTrackerNotesDisplayType", displayTypes, SECTION_DISPLAY_HIDDEN)) {
|
||||
if (CVarGetInteger(ITEM_TRACKER_CVAR("DisplayType.Main"), TRACKER_DISPLAY_ALWAYS) == TRACKER_DISPLAY_ALWAYS) {
|
||||
if (UIWidgets::LabeledRightAlignedEnhancementCombobox("Personal notes", ITEM_TRACKER_CVAR("DisplayType.Notes"), displayTypes, SECTION_DISPLAY_HIDDEN)) {
|
||||
shouldUpdateVectors = true;
|
||||
}
|
||||
}
|
||||
UIWidgets::EnhancementCheckbox("Show Hookshot Identifiers", "gTrackers.ItemTracker.HookshotIdentifier");
|
||||
UIWidgets::EnhancementCheckbox("Show Hookshot Identifiers", ITEM_TRACKER_CVAR("HookshotIdentifier"));
|
||||
UIWidgets::InsertHelpHoverText("Shows an 'H' or an 'L' to more easiely distinguish between Hookshot and Longshot.");
|
||||
|
||||
UIWidgets::Spacer(0);
|
||||
@ -1260,10 +1260,10 @@ void ItemTrackerSettingsWindow::DrawElement() {
|
||||
}
|
||||
|
||||
void ItemTrackerWindow::InitElement() {
|
||||
float trackerBgR = CVarGetFloat("gItemTrackerBgColorR", 0);
|
||||
float trackerBgG = CVarGetFloat("gItemTrackerBgColorG", 0);
|
||||
float trackerBgB = CVarGetFloat("gItemTrackerBgColorB", 0);
|
||||
float trackerBgA = CVarGetFloat("gItemTrackerBgColorA", 1);
|
||||
float trackerBgR = CVarGetFloat(ITEM_TRACKER_CVAR("BgColorR"), 0);
|
||||
float trackerBgG = CVarGetFloat(ITEM_TRACKER_CVAR("BgColorG"), 0);
|
||||
float trackerBgB = CVarGetFloat(ITEM_TRACKER_CVAR("BgColorB"), 0);
|
||||
float trackerBgA = CVarGetFloat(ITEM_TRACKER_CVAR("BgColorA"), 1);
|
||||
ChromaKeyBackground = {
|
||||
trackerBgR,
|
||||
trackerBgG,
|
||||
|
@ -2535,12 +2535,12 @@ extern "C" int CustomMessage_RetrieveIfExists(PlayState* play) {
|
||||
RandomizerInf randoInf = (RandomizerInf)((textId - (TEXT_SHOP_ITEM_RANDOM + NUM_SHOP_ITEMS)) + RAND_INF_SHOP_ITEMS_KF_SHOP_ITEM_1);
|
||||
messageEntry = OTRGlobals::Instance->gRandomizer->GetMerchantMessage(randoInf, TEXT_SHOP_ITEM_RANDOM_CONFIRM);
|
||||
}
|
||||
} else if (CVarGetInteger("gRandomizeRupeeNames", 1) &&
|
||||
} else if (CVarGetInteger(RANDO_ENHANCEMENT_CVAR("RandomizeRupeeNames"), 1) &&
|
||||
(textId == TEXT_BLUE_RUPEE || textId == TEXT_RED_RUPEE || textId == TEXT_PURPLE_RUPEE ||
|
||||
textId == TEXT_HUGE_RUPEE)) {
|
||||
messageEntry = Randomizer::GetRupeeMessage(textId);
|
||||
// In rando, replace Navi's general overworld hints with rando-related gameplay tips
|
||||
} else if (CVarGetInteger("gRandoRelevantNavi", 1) && textId >= 0x0140 && textId <= 0x015F) {
|
||||
} else if (CVarGetInteger(RANDO_ENHANCEMENT_CVAR("RandoRelevantNavi"), 1) && textId >= 0x0140 && textId <= 0x015F) {
|
||||
u16 naviTextId = Random(0, NUM_NAVI_MESSAGES);
|
||||
messageEntry = CustomMessageManager::Instance->RetrieveMessage(Randomizer::NaviRandoMessageTableID, naviTextId);
|
||||
} else if (Randomizer_GetSettingValue(RSK_SHUFFLE_MAGIC_BEANS) && textId == TEXT_BEAN_SALESMAN) {
|
||||
|
@ -65,7 +65,7 @@ private:
|
||||
uint32_t IsGameMasterQuest();
|
||||
#endif
|
||||
|
||||
#define RANDOMIZER_CVAR(var) "gRandoEnhancements." var
|
||||
#define RANDO_ENHANCEMENT_CVAR(var) "gRandoEnhancements." var
|
||||
#define RANDOMIZER_SEED_CVAR(var) "gRandoSettings." var
|
||||
#define COSMETIC_CVAR(var) "gCosmetics." var
|
||||
#define AUDIO_CVAR(var) "gAudioEditor." var
|
||||
@ -79,7 +79,8 @@ uint32_t IsGameMasterQuest();
|
||||
#define ITEM_TRACKER_CVAR(var) TRACKER_CVAR("ItemTracker." var)
|
||||
#define CHECK_TRACKER_CVAR(var) TRACKER_CVAR("CheckTracker." var)
|
||||
#define ENTRANCE_TRACKER_CVAR(var) TRACKER_CVAR("EntranceTracker." var)
|
||||
#define DEV_TOOLS_CVAR(var) "gDeveloperTools."
|
||||
#define DEV_TOOLS_CVAR(var) "gDeveloperTools." var
|
||||
#define GENERAL_CVAR(var) "gGeneral." var
|
||||
|
||||
#ifndef __cplusplus
|
||||
void InitOTR(void);
|
||||
|
@ -165,41 +165,41 @@ namespace SohGui {
|
||||
SPDLOG_ERROR("Could not find input editor window");
|
||||
}
|
||||
|
||||
mAudioEditorWindow = std::make_shared<AudioEditor>("gAudioEditor.WindowOpen", "Audio Editor");
|
||||
mAudioEditorWindow = std::make_shared<AudioEditor>(WINDOW_CVAR("AudioEditor"), "Audio Editor");
|
||||
gui->AddGuiWindow(mAudioEditorWindow);
|
||||
mInputViewer = std::make_shared<InputViewer>("gOpenWindows.InputViewer", "Input Viewer");
|
||||
mInputViewer = std::make_shared<InputViewer>(WINDOW_CVAR("InputViewer"), "Input Viewer");
|
||||
gui->AddGuiWindow(mInputViewer);
|
||||
mInputViewerSettings = std::make_shared<InputViewerSettingsWindow>("gOpenWindows.InputViewerSettings", "Input Viewer Settings");
|
||||
mInputViewerSettings = std::make_shared<InputViewerSettingsWindow>(WINDOW_CVAR("InputViewerSettings"), "Input Viewer Settings");
|
||||
gui->AddGuiWindow(mInputViewerSettings);
|
||||
mCosmeticsEditorWindow = std::make_shared<CosmeticsEditorWindow>("gCosmeticsEditorEnabled", "Cosmetics Editor");
|
||||
mCosmeticsEditorWindow = std::make_shared<CosmeticsEditorWindow>(WINDOW_CVAR("CosmeticsEditor"), "Cosmetics Editor");
|
||||
gui->AddGuiWindow(mCosmeticsEditorWindow);
|
||||
mActorViewerWindow = std::make_shared<ActorViewerWindow>("gActorViewerEnabled", "Actor Viewer");
|
||||
mActorViewerWindow = std::make_shared<ActorViewerWindow>(WINDOW_CVAR("ActorViewer"), "Actor Viewer");
|
||||
gui->AddGuiWindow(mActorViewerWindow);
|
||||
mColViewerWindow = std::make_shared<ColViewerWindow>("gCollisionViewerEnabled", "Collision Viewer");
|
||||
mColViewerWindow = std::make_shared<ColViewerWindow>(WINDOW_CVAR("CollisionViewer"), "Collision Viewer");
|
||||
gui->AddGuiWindow(mColViewerWindow);
|
||||
mSaveEditorWindow = std::make_shared<SaveEditorWindow>("gSaveEditorEnabled", "Save Editor");
|
||||
mSaveEditorWindow = std::make_shared<SaveEditorWindow>(WINDOW_CVAR("SaveEditor"), "Save Editor");
|
||||
gui->AddGuiWindow(mSaveEditorWindow);
|
||||
mDLViewerWindow = std::make_shared<DLViewerWindow>("gDLViewerEnabled", "Display List Viewer");
|
||||
mDLViewerWindow = std::make_shared<DLViewerWindow>(WINDOW_CVAR("DLViewer"), "Display List Viewer");
|
||||
gui->AddGuiWindow(mDLViewerWindow);
|
||||
mValueViewerWindow = std::make_shared<ValueViewerWindow>("gValueViewer.WindowOpen", "Value Viewer");
|
||||
mValueViewerWindow = std::make_shared<ValueViewerWindow>(WINDOW_CVAR("ValueViewer"), "Value Viewer");
|
||||
gui->AddGuiWindow(mValueViewerWindow);
|
||||
mMessageViewerWindow = std::make_shared<MessageViewer>("gMessageViewerEnabled", "Message Viewer");
|
||||
mMessageViewerWindow = std::make_shared<MessageViewer>(WINDOW_CVAR("MessageViewer"), "Message Viewer");
|
||||
gui->AddGuiWindow(mMessageViewerWindow);
|
||||
mGameplayStatsWindow = std::make_shared<GameplayStatsWindow>("gGameplayStatsEnabled", "Gameplay Stats");
|
||||
mGameplayStatsWindow = std::make_shared<GameplayStatsWindow>(WINDOW_CVAR("GameplayStats"), "Gameplay Stats");
|
||||
gui->AddGuiWindow(mGameplayStatsWindow);
|
||||
mCheckTrackerWindow = std::make_shared<CheckTracker::CheckTrackerWindow>("gCheckTrackerEnabled", "Check Tracker");
|
||||
mCheckTrackerWindow = std::make_shared<CheckTracker::CheckTrackerWindow>(WINDOW_CVAR("CheckTracker"), "Check Tracker");
|
||||
gui->AddGuiWindow(mCheckTrackerWindow);
|
||||
mCheckTrackerSettingsWindow = std::make_shared<CheckTracker::CheckTrackerSettingsWindow>("gCheckTrackerSettingsEnabled", "Check Tracker Settings");
|
||||
mCheckTrackerSettingsWindow = std::make_shared<CheckTracker::CheckTrackerSettingsWindow>(WINDOW_CVAR("CheckTrackerSettings"), "Check Tracker Settings");
|
||||
gui->AddGuiWindow(mCheckTrackerSettingsWindow);
|
||||
mEntranceTrackerWindow = std::make_shared<EntranceTrackerWindow>("gEntranceTrackerEnabled","Entrance Tracker");
|
||||
mEntranceTrackerWindow = std::make_shared<EntranceTrackerWindow>(WINDOW_CVAR("EntranceTracker"),"Entrance Tracker");
|
||||
gui->AddGuiWindow(mEntranceTrackerWindow);
|
||||
mItemTrackerWindow = std::make_shared<ItemTrackerWindow>("gItemTrackerEnabled", "Item Tracker");
|
||||
mItemTrackerWindow = std::make_shared<ItemTrackerWindow>(WINDOW_CVAR("ItemTracker"), "Item Tracker");
|
||||
gui->AddGuiWindow(mItemTrackerWindow);
|
||||
mItemTrackerSettingsWindow = std::make_shared<ItemTrackerSettingsWindow>("gItemTrackerSettingsEnabled", "Item Tracker Settings");
|
||||
mItemTrackerSettingsWindow = std::make_shared<ItemTrackerSettingsWindow>(WINDOW_CVAR("ItemTrackerSettings"), "Item Tracker Settings");
|
||||
gui->AddGuiWindow(mItemTrackerSettingsWindow);
|
||||
mRandomizerSettingsWindow = std::make_shared<RandomizerSettingsWindow>("gRandomizerSettingsEnabled", "Randomizer Settings");
|
||||
mRandomizerSettingsWindow = std::make_shared<RandomizerSettingsWindow>(WINDOW_CVAR("RandomizerSettings"), "Randomizer Settings");
|
||||
gui->AddGuiWindow(mRandomizerSettingsWindow);
|
||||
mAdvancedResolutionSettingsWindow = std::make_shared<AdvancedResolutionSettings::AdvancedResolutionSettingsWindow>("gAdvancedResolutionEditorEnabled", "Advanced Resolution Settings");
|
||||
mAdvancedResolutionSettingsWindow = std::make_shared<AdvancedResolutionSettings::AdvancedResolutionSettingsWindow>(WINDOW_CVAR("AdvancedResolutionEditor"), "Advanced Resolution Settings");
|
||||
gui->AddGuiWindow(mAdvancedResolutionSettingsWindow);
|
||||
mModalWindow = std::make_shared<SohModalWindow>("gOpenWindows.modalWindowEnabled", "Modal Window");
|
||||
gui->AddGuiWindow(mModalWindow);
|
||||
|
@ -248,12 +248,12 @@ void DrawSettingsMenu() {
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_FrameBorderSize, 1.0f);
|
||||
ImGui::PushStyleColor(ImGuiCol_Border, ImVec4(0.22f, 0.38f, 0.56f, 1.0f));
|
||||
if (mInputViewer) {
|
||||
if (ImGui::Button(GetWindowButtonText("Input Viewer", CVarGetInteger("gOpenWindows.InputViewer", 0)).c_str(), ImVec2 (-1.0f, 0.0f))) {
|
||||
if (ImGui::Button(GetWindowButtonText("Input Viewer", CVarGetInteger(WINDOW_CVAR("InputViewer"), 0)).c_str(), ImVec2 (-1.0f, 0.0f))) {
|
||||
mInputViewer->ToggleVisibility();
|
||||
}
|
||||
}
|
||||
if (mInputViewerSettings) {
|
||||
if (ImGui::Button(GetWindowButtonText("Input Viewer Settings", CVarGetInteger("gOpenWindows.InputViewerSettings", 0)).c_str(), ImVec2 (-1.0f, 0.0f))) {
|
||||
if (ImGui::Button(GetWindowButtonText("Input Viewer Settings", CVarGetInteger(WINDOW_CVAR("InputViewerSettings"), 0)).c_str(), ImVec2 (-1.0f, 0.0f))) {
|
||||
mInputViewerSettings->ToggleVisibility();
|
||||
}
|
||||
}
|
||||
@ -287,7 +287,7 @@ void DrawSettingsMenu() {
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_FrameBorderSize, 1.0f);
|
||||
ImGui::PushStyleColor(ImGuiCol_Border, ImVec4(0.22f, 0.38f, 0.56f, 1.0f));
|
||||
UIWidgets::Spacer(0);
|
||||
if (ImGui::Button(GetWindowButtonText("Advanced Resolution", CVarGetInteger("gAdvancedResolutionEditorEnabled", 0)).c_str(), ImVec2(-1.0f, 0.0f))) {
|
||||
if (ImGui::Button(GetWindowButtonText("Advanced Resolution", CVarGetInteger(WINDOW_CVAR("AdvancedResolutionEditor"), 0)).c_str(), ImVec2(-1.0f, 0.0f))) {
|
||||
mAdvancedResolutionSettingsWindow->ToggleVisibility();
|
||||
}
|
||||
ImGui::PopStyleColor(1);
|
||||
@ -1395,19 +1395,19 @@ void DrawEnhancementsMenu() {
|
||||
ImGui::PushStyleColor(ImGuiCol_Border, ImVec4(0.22f, 0.38f, 0.56f, 1.0f));
|
||||
|
||||
if (mCosmeticsEditorWindow) {
|
||||
if (ImGui::Button(GetWindowButtonText("Cosmetics Editor", CVarGetInteger("gCosmeticsEditorEnabled", 0)).c_str(), ImVec2(-1.0f, 0.0f))) {
|
||||
if (ImGui::Button(GetWindowButtonText("Cosmetics Editor", CVarGetInteger(WINDOW_CVAR("CosmeticsEditor"), 0)).c_str(), ImVec2(-1.0f, 0.0f))) {
|
||||
mCosmeticsEditorWindow->ToggleVisibility();
|
||||
}
|
||||
}
|
||||
|
||||
if (mAudioEditorWindow) {
|
||||
if (ImGui::Button(GetWindowButtonText("Audio Editor", CVarGetInteger("gAudioEditor.WindowOpen", 0)).c_str(), ImVec2(-1.0f, 0.0f))) {
|
||||
if (ImGui::Button(GetWindowButtonText("Audio Editor", CVarGetInteger(WINDOW_CVAR("AudioEditor"), 0)).c_str(), ImVec2(-1.0f, 0.0f))) {
|
||||
mAudioEditorWindow->ToggleVisibility();
|
||||
}
|
||||
}
|
||||
|
||||
if (mGameplayStatsWindow) {
|
||||
if (ImGui::Button(GetWindowButtonText("Gameplay Stats", CVarGetInteger("gGameplayStatsEnabled", 0)).c_str(), ImVec2(-1.0f, 0.0f))) {
|
||||
if (ImGui::Button(GetWindowButtonText("Gameplay Stats", CVarGetInteger(WINDOW_CVAR("GameplayStats"), 0)).c_str(), ImVec2(-1.0f, 0.0f))) {
|
||||
mGameplayStatsWindow->ToggleVisibility();
|
||||
}
|
||||
}
|
||||
@ -1692,37 +1692,37 @@ void DrawDeveloperToolsMenu() {
|
||||
}
|
||||
UIWidgets::Spacer(0);
|
||||
if (mSaveEditorWindow) {
|
||||
if (ImGui::Button(GetWindowButtonText("Save Editor", CVarGetInteger("gSaveEditorEnabled", 0)).c_str(), ImVec2(-1.0f, 0.0f))) {
|
||||
if (ImGui::Button(GetWindowButtonText("Save Editor", CVarGetInteger(WINDOW_CVAR("SaveEditor"), 0)).c_str(), ImVec2(-1.0f, 0.0f))) {
|
||||
mSaveEditorWindow->ToggleVisibility();
|
||||
}
|
||||
}
|
||||
UIWidgets::Spacer(0);
|
||||
if (mColViewerWindow) {
|
||||
if (ImGui::Button(GetWindowButtonText("Collision Viewer", CVarGetInteger("gCollisionViewerEnabled", 0)).c_str(), ImVec2(-1.0f, 0.0f))) {
|
||||
if (ImGui::Button(GetWindowButtonText("Collision Viewer", CVarGetInteger(WINDOW_CVAR("CollisionViewer"), 0)).c_str(), ImVec2(-1.0f, 0.0f))) {
|
||||
mColViewerWindow->ToggleVisibility();
|
||||
}
|
||||
}
|
||||
UIWidgets::Spacer(0);
|
||||
if (mActorViewerWindow) {
|
||||
if (ImGui::Button(GetWindowButtonText("Actor Viewer", CVarGetInteger("gActorViewerEnabled", 0)).c_str(), ImVec2(-1.0f, 0.0f))) {
|
||||
if (ImGui::Button(GetWindowButtonText("Actor Viewer", CVarGetInteger(WINDOW_CVAR("ActorViewer"), 0)).c_str(), ImVec2(-1.0f, 0.0f))) {
|
||||
mActorViewerWindow->ToggleVisibility();
|
||||
}
|
||||
}
|
||||
UIWidgets::Spacer(0);
|
||||
if (mDLViewerWindow) {
|
||||
if (ImGui::Button(GetWindowButtonText("Display List Viewer", CVarGetInteger("gDLViewerEnabled", 0)).c_str(), ImVec2(-1.0f, 0.0f))) {
|
||||
if (ImGui::Button(GetWindowButtonText("Display List Viewer", CVarGetInteger(WINDOW_CVAR("DLViewer"), 0)).c_str(), ImVec2(-1.0f, 0.0f))) {
|
||||
mDLViewerWindow->ToggleVisibility();
|
||||
}
|
||||
}
|
||||
UIWidgets::Spacer(0);
|
||||
if (mValueViewerWindow) {
|
||||
if (ImGui::Button(GetWindowButtonText("Value Viewer", CVarGetInteger("gValueViewer.WindowOpen", 0)).c_str(), ImVec2(-1.0f, 0.0f))) {
|
||||
if (ImGui::Button(GetWindowButtonText("Value Viewer", CVarGetInteger(WINDOW_CVAR("ValueViewer"), 0)).c_str(), ImVec2(-1.0f, 0.0f))) {
|
||||
mValueViewerWindow->ToggleVisibility();
|
||||
}
|
||||
}
|
||||
UIWidgets::Spacer(0);
|
||||
if (mMessageViewerWindow) {
|
||||
if (ImGui::Button(GetWindowButtonText("Message Viewer", CVarGetInteger("gMessageViewerEnabled", 0)).c_str(), ImVec2(-1.0f, 0.0f))) {
|
||||
if (ImGui::Button(GetWindowButtonText("Message Viewer", CVarGetInteger(WINDOW_CVAR("MessageViewer"), 0)).c_str(), ImVec2(-1.0f, 0.0f))) {
|
||||
mMessageViewerWindow->ToggleVisibility();
|
||||
}
|
||||
}
|
||||
@ -1884,39 +1884,39 @@ void DrawRandomizerMenu() {
|
||||
static ImVec2 buttonSize(200.0f, 0.0f);
|
||||
#endif
|
||||
if (mRandomizerSettingsWindow) {
|
||||
if (ImGui::Button(GetWindowButtonText("Randomizer Settings", CVarGetInteger("gRandomizerSettingsEnabled", 0)).c_str(), buttonSize)) {
|
||||
if (ImGui::Button(GetWindowButtonText("Randomizer Settings", CVarGetInteger(WINDOW_CVAR("RandomizerSettings"), 0)).c_str(), buttonSize)) {
|
||||
mRandomizerSettingsWindow->ToggleVisibility();
|
||||
}
|
||||
}
|
||||
|
||||
UIWidgets::Spacer(0);
|
||||
if (mItemTrackerWindow) {
|
||||
if (ImGui::Button(GetWindowButtonText("Item Tracker", CVarGetInteger("gItemTrackerEnabled", 0)).c_str(), buttonSize)) {
|
||||
if (ImGui::Button(GetWindowButtonText("Item Tracker", CVarGetInteger(WINDOW_CVAR("ItemTracker"), 0)).c_str(), buttonSize)) {
|
||||
mItemTrackerWindow->ToggleVisibility();
|
||||
}
|
||||
}
|
||||
|
||||
UIWidgets::Spacer(0);
|
||||
if (mItemTrackerSettingsWindow) {
|
||||
if (ImGui::Button(GetWindowButtonText("Item Tracker Settings", CVarGetInteger("gItemTrackerSettingsEnabled", 0)).c_str(), buttonSize)) {
|
||||
if (ImGui::Button(GetWindowButtonText("Item Tracker Settings", CVarGetInteger(WINDOW_CVAR("ItemTrackerSettings"), 0)).c_str(), buttonSize)) {
|
||||
mItemTrackerSettingsWindow->ToggleVisibility();
|
||||
}
|
||||
}
|
||||
UIWidgets::Spacer(0);
|
||||
if (mEntranceTrackerWindow) {
|
||||
if (ImGui::Button(GetWindowButtonText("Entrance Tracker", CVarGetInteger("gEntranceTrackerEnabled", 0)).c_str(), buttonSize)) {
|
||||
if (ImGui::Button(GetWindowButtonText("Entrance Tracker", CVarGetInteger(WINDOW_CVAR("EntranceTracker"), 0)).c_str(), buttonSize)) {
|
||||
mEntranceTrackerWindow->ToggleVisibility();
|
||||
}
|
||||
}
|
||||
UIWidgets::Spacer(0);
|
||||
if (mCheckTrackerWindow) {
|
||||
if (ImGui::Button(GetWindowButtonText("Check Tracker", CVarGetInteger("gCheckTrackerEnabled", 0)).c_str(), buttonSize)) {
|
||||
if (ImGui::Button(GetWindowButtonText("Check Tracker", CVarGetInteger(WINDOW_CVAR("CheckTracker"), 0)).c_str(), buttonSize)) {
|
||||
mCheckTrackerWindow->ToggleVisibility();
|
||||
}
|
||||
}
|
||||
UIWidgets::Spacer(0);
|
||||
if (mCheckTrackerSettingsWindow) {
|
||||
if (ImGui::Button(GetWindowButtonText("Check Tracker Settings", CVarGetInteger("gCheckTrackerSettingsEnabled", 0)).c_str(), buttonSize)) {
|
||||
if (ImGui::Button(GetWindowButtonText("Check Tracker Settings", CVarGetInteger(WINDOW_CVAR("CheckTrackerSettings"), 0)).c_str(), buttonSize)) {
|
||||
mCheckTrackerSettingsWindow->ToggleVisibility();
|
||||
}
|
||||
}
|
||||
@ -1927,11 +1927,11 @@ void DrawRandomizerMenu() {
|
||||
|
||||
if (ImGui::BeginMenu("Rando Enhancements"))
|
||||
{
|
||||
UIWidgets::EnhancementCheckbox("Rando-Relevant Navi Hints", "gRandoRelevantNavi", false, "", UIWidgets::CheckboxGraphics::Cross, true);
|
||||
UIWidgets::EnhancementCheckbox("Rando-Relevant Navi Hints", RANDO_ENHANCEMENT_CVAR("RandoRelevantNavi"), false, "", UIWidgets::CheckboxGraphics::Cross, true);
|
||||
UIWidgets::Tooltip(
|
||||
"Replace Navi's overworld quest hints with rando-related gameplay hints."
|
||||
);
|
||||
UIWidgets::PaddedEnhancementCheckbox("Random Rupee Names", "gRandomizeRupeeNames", true, false, false, "", UIWidgets::CheckboxGraphics::Cross, true);
|
||||
UIWidgets::PaddedEnhancementCheckbox("Random Rupee Names", RANDO_ENHANCEMENT_CVAR("RandomizeRupeeNames"), true, false, false, "", UIWidgets::CheckboxGraphics::Cross, true);
|
||||
UIWidgets::Tooltip(
|
||||
"When obtaining rupees, randomize what the rupee is called in the textbox."
|
||||
);
|
||||
@ -1957,13 +1957,13 @@ void DrawRandomizerMenu() {
|
||||
"This setting is disabled because a savefile is loaded without any key\n"
|
||||
"shuffle settings set to \"Any Dungeon\", \"Overworld\" or \"Anywhere\"";
|
||||
|
||||
UIWidgets::PaddedEnhancementCheckbox("Key Colors Match Dungeon", "gRandoMatchKeyColors", true, false,
|
||||
UIWidgets::PaddedEnhancementCheckbox("Key Colors Match Dungeon", RANDO_ENHANCEMENT_CVAR("MatchKeyColors"), true, false,
|
||||
disableKeyColors, disableKeyColorsText, UIWidgets::CheckboxGraphics::Cross, true);
|
||||
UIWidgets::Tooltip(
|
||||
"Matches the color of small keys and boss keys to the dungeon they belong to. "
|
||||
"This helps identify keys from afar and adds a little bit of flair.\n\nThis only "
|
||||
"applies to seeds with keys and boss keys shuffled to Any Dungeon, Overworld, or Anywhere.");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Quest Item Fanfares", "gRandoQuestItemFanfares", true, false);
|
||||
UIWidgets::PaddedEnhancementCheckbox("Quest Item Fanfares", RANDO_ENHANCEMENT_CVAR("QuestItemFanfares"), true, false);
|
||||
UIWidgets::Tooltip(
|
||||
"Play unique fanfares when obtaining quest items "
|
||||
"(medallions/stones/songs). Note that these fanfares are longer than usual."
|
||||
|
@ -4025,7 +4025,7 @@ void Audio_PlayFanfare_Rando(GetItemEntry getItem) {
|
||||
temp1 = NA_BGM_SMALL_ITEM_GET | 0x900;
|
||||
}
|
||||
// If the setting is toggled on and we get special quest items (longer fanfares):
|
||||
if (CVarGetInteger("gRandoQuestItemFanfares", 0) != 0) {
|
||||
if (CVarGetInteger(RANDO_ENHANCEMENT_CVAR("QuestItemFanfares"), 0) != 0) {
|
||||
// If we get a medallion, play the "get a medallion" fanfare
|
||||
if ((itemId >= ITEM_MEDALLION_FOREST) && (itemId <= ITEM_MEDALLION_LIGHT)) {
|
||||
temp1 = NA_BGM_MEDALLION_GET | 0x900;
|
||||
|
Loading…
Reference in New Issue
Block a user