Swapped Entrance Tracker CVars.
This commit is contained in:
parent
4b06ab9d5c
commit
3805219868
|
@ -665,25 +665,25 @@ void EntranceTrackerWindow::DrawElement() {
|
||||||
ImGui::TableNextColumn();
|
ImGui::TableNextColumn();
|
||||||
|
|
||||||
ImGui::Text("Sort By");
|
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::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::Tooltip("Sort entrances by the overrided destination");
|
||||||
|
|
||||||
UIWidgets::Spacer(2.0f);
|
UIWidgets::Spacer(2.0f);
|
||||||
|
|
||||||
ImGui::Text("List Items");
|
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::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::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::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");
|
UIWidgets::Tooltip("Collapse undiscovered entrances towards the bottom of each group");
|
||||||
bool disableHideReverseEntrances = OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_DECOUPLED_ENTRANCES) == RO_GENERIC_ON;
|
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.";
|
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);
|
disableHideReverseEntrances, disableHideReverseEntrancesText, UIWidgets::CheckboxGraphics::Cross, true);
|
||||||
UIWidgets::Tooltip("Hide reverse entrance transitions when Decouple Entrances is off");
|
UIWidgets::Tooltip("Hide reverse entrance transitions when Decouple Entrances is off");
|
||||||
UIWidgets::Spacer(0);
|
UIWidgets::Spacer(0);
|
||||||
|
@ -691,17 +691,17 @@ void EntranceTrackerWindow::DrawElement() {
|
||||||
ImGui::TableNextColumn();
|
ImGui::TableNextColumn();
|
||||||
|
|
||||||
ImGui::Text("Group By");
|
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::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::Tooltip("Group entrances by their entrance type");
|
||||||
|
|
||||||
UIWidgets::Spacer(2.0f);
|
UIWidgets::Spacer(2.0f);
|
||||||
|
|
||||||
ImGui::Text("Spoiler Reveal");
|
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::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");
|
UIWidgets::Tooltip("Reveal the \"From\" entrance for undiscovered entrances");
|
||||||
|
|
||||||
ImGui::EndTable();
|
ImGui::EndTable();
|
||||||
|
@ -749,8 +749,8 @@ void EntranceTrackerWindow::DrawElement() {
|
||||||
nextTreeState = 2;
|
nextTreeState = 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
uint8_t destToggle = CVarGetInteger("gEntranceTrackerSortBy", 0);
|
uint8_t destToggle = CVarGetInteger(ENTRANCE_TRACKER_CVAR("SortBy"), 0);
|
||||||
uint8_t groupToggle = CVarGetInteger("gEntranceTrackerGroupBy", 0);
|
uint8_t groupToggle = CVarGetInteger(ENTRANCE_TRACKER_CVAR("GroupBy"), 0);
|
||||||
|
|
||||||
// Combine destToggle and groupToggle to get a range of 0-3
|
// Combine destToggle and groupToggle to get a range of 0-3
|
||||||
uint8_t groupType = destToggle + (groupToggle * 2);
|
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
|
// 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) &&
|
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) &&
|
(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;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -812,8 +812,8 @@ void EntranceTrackerWindow::DrawElement() {
|
||||||
|
|
||||||
bool isDiscovered = IsEntranceDiscovered(entrance.index);
|
bool isDiscovered = IsEntranceDiscovered(entrance.index);
|
||||||
|
|
||||||
bool showOriginal = (!destToggle ? CVarGetInteger("gEntranceTrackerShowTo", 0) : CVarGetInteger("gEntranceTrackerShowFrom", 0)) || isDiscovered;
|
bool showOriginal = (!destToggle ? CVarGetInteger(ENTRANCE_TRACKER_CVAR("ShowTo"), 0) : CVarGetInteger(ENTRANCE_TRACKER_CVAR("ShowFrom"), 0)) || isDiscovered;
|
||||||
bool showOverride = (!destToggle ? CVarGetInteger("gEntranceTrackerShowFrom", 0) : CVarGetInteger("gEntranceTrackerShowTo", 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* origSrcAreaName = spoilerEntranceGroupNames[original->srcGroup].c_str();
|
||||||
const char* origTypeName = groupTypeNames[original->type].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() : "";
|
const char* rplcDstName = showOverride ? override->destination.c_str() : "";
|
||||||
|
|
||||||
// Filter for entrances by group name, type, source/destination names, and meta tags
|
// 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) ||
|
((showOriginal && (locationSearch.PassFilter(origSrcName) ||
|
||||||
locationSearch.PassFilter(origDstName) || locationSearch.PassFilter(origSrcAreaName) ||
|
locationSearch.PassFilter(origDstName) || locationSearch.PassFilter(origSrcAreaName) ||
|
||||||
locationSearch.PassFilter(origTypeName) || locationSearch.PassFilter(original->metaTag.c_str()))) ||
|
locationSearch.PassFilter(origTypeName) || locationSearch.PassFilter(original->metaTag.c_str()))) ||
|
||||||
|
@ -864,8 +864,8 @@ void EntranceTrackerWindow::DrawElement() {
|
||||||
|
|
||||||
bool isDiscovered = IsEntranceDiscovered(entrance.index);
|
bool isDiscovered = IsEntranceDiscovered(entrance.index);
|
||||||
|
|
||||||
bool showOriginal = (!destToggle ? CVarGetInteger("gEntranceTrackerShowTo", 0) : CVarGetInteger("gEntranceTrackerShowFrom", 0)) || isDiscovered;
|
bool showOriginal = (!destToggle ? CVarGetInteger(ENTRANCE_TRACKER_CVAR("ShowTo"), 0) : CVarGetInteger(ENTRANCE_TRACKER_CVAR("ShowFrom"), 0)) || isDiscovered;
|
||||||
bool showOverride = (!destToggle ? CVarGetInteger("gEntranceTrackerShowFrom", 0) : CVarGetInteger("gEntranceTrackerShowTo", 0)) || isDiscovered;
|
bool showOverride = (!destToggle ? CVarGetInteger(ENTRANCE_TRACKER_CVAR("ShowFrom"), 0) : CVarGetInteger(ENTRANCE_TRACKER_CVAR("ShowTo"), 0)) || isDiscovered;
|
||||||
|
|
||||||
const char* unknown = "???";
|
const char* unknown = "???";
|
||||||
|
|
||||||
|
@ -879,16 +879,16 @@ void EntranceTrackerWindow::DrawElement() {
|
||||||
// Handle highlighting and auto scroll
|
// Handle highlighting and auto scroll
|
||||||
if ((original->index == lastEntranceIndex ||
|
if ((original->index == lastEntranceIndex ||
|
||||||
(override->reverseIndex == lastEntranceIndex && OTRGlobals::Instance->gRandomizer->GetRandoSettingValue(RSK_DECOUPLED_ENTRANCES) == RO_GENERIC_OFF)) &&
|
(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;
|
color = COLOR_ORANGE;
|
||||||
} else if (LinkIsInArea(original) != -1) {
|
} else if (LinkIsInArea(original) != -1) {
|
||||||
if (CVarGetInteger("gEntranceTrackerHighlightAvailable", 0)) {
|
if (CVarGetInteger(ENTRANCE_TRACKER_CVAR("HighlightAvailable"), 0)) {
|
||||||
color = COLOR_GREEN;
|
color = COLOR_GREEN;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (doAreaScroll) {
|
if (doAreaScroll) {
|
||||||
doAreaScroll = false;
|
doAreaScroll = false;
|
||||||
if (CVarGetInteger("gEntranceTrackerAutoScroll", 0)) {
|
if (CVarGetInteger(ENTRANCE_TRACKER_CVAR("AutoScroll"), 0)) {
|
||||||
ImGui::SetScrollHereY(0.0f);
|
ImGui::SetScrollHereY(0.0f);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue