mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-20 13:23:45 -07:00
Removed the Logic Tooltips and only enable the Show Check Logic button when Available Checks is enabled.
This commit is contained in:
parent
9236fd3683
commit
16a530e0ab
1 changed files with 9 additions and 17 deletions
|
@ -179,7 +179,7 @@ bool hideSaved = false;
|
||||||
bool hideCollected = false;
|
bool hideCollected = false;
|
||||||
bool showHidden = true;
|
bool showHidden = true;
|
||||||
bool mystery = false;
|
bool mystery = false;
|
||||||
bool showLogicTooltip = false;
|
bool showLogicButton = false;
|
||||||
bool enableAvailableChecks = false;
|
bool enableAvailableChecks = false;
|
||||||
bool onlyShowAvailable = false;
|
bool onlyShowAvailable = false;
|
||||||
|
|
||||||
|
@ -968,7 +968,7 @@ void CheckTrackerWindow::DrawElement() {
|
||||||
hideCollected = CVarGetInteger(CVAR_TRACKER_CHECK("Collected.Hide"), 0);
|
hideCollected = CVarGetInteger(CVAR_TRACKER_CHECK("Collected.Hide"), 0);
|
||||||
showHidden = CVarGetInteger(CVAR_TRACKER_CHECK("ShowHidden"), 0);
|
showHidden = CVarGetInteger(CVAR_TRACKER_CHECK("ShowHidden"), 0);
|
||||||
mystery = CVarGetInteger(CVAR_RANDOMIZER_ENHANCEMENT("MysteriousShuffle"), 0);
|
mystery = CVarGetInteger(CVAR_RANDOMIZER_ENHANCEMENT("MysteriousShuffle"), 0);
|
||||||
showLogicTooltip = CVarGetInteger(CVAR_TRACKER_CHECK("ShowLogic"), 0);
|
showLogicButton = CVarGetInteger(CVAR_TRACKER_CHECK("ShowLogic"), 0);
|
||||||
enableAvailableChecks = CVarGetInteger(CVAR_TRACKER_CHECK("EnableAvailableChecks"), 0);
|
enableAvailableChecks = CVarGetInteger(CVAR_TRACKER_CHECK("EnableAvailableChecks"), 0);
|
||||||
onlyShowAvailable = CVarGetInteger(CVAR_TRACKER_CHECK("OnlyShowAvailable"), 0);
|
onlyShowAvailable = CVarGetInteger(CVAR_TRACKER_CHECK("OnlyShowAvailable"), 0);
|
||||||
|
|
||||||
|
@ -1916,17 +1916,7 @@ void DrawLocation(RandomizerCheck rc) {
|
||||||
ImGui::PopStyleColor();
|
ImGui::PopStyleColor();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (showLogicTooltip) {
|
if (showLogicButton && enableAvailableChecks) {
|
||||||
for (auto& locationInRegion : areaTable[itemLoc->GetParentRegionKey()].locations) {
|
|
||||||
if (locationInRegion.GetLocation() == rc) {
|
|
||||||
std::string conditionStr = locationInRegion.GetConditionStr();
|
|
||||||
if (conditionStr != "true") {
|
|
||||||
UIWidgets::Tooltip(conditionStr.c_str());
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
if (ImGui::Button((std::string(ICON_FA_COGS) + "##" + std::to_string(rc)).c_str())) {
|
if (ImGui::Button((std::string(ICON_FA_COGS) + "##" + std::to_string(rc)).c_str())) {
|
||||||
LogicTrackerWindow::ShowRandomizerCheck(rc);
|
LogicTrackerWindow::ShowRandomizerCheck(rc);
|
||||||
|
@ -2159,10 +2149,6 @@ void CheckTrackerSettingsWindow::DrawElement() {
|
||||||
alwaysShowGS = !alwaysShowGS;
|
alwaysShowGS = !alwaysShowGS;
|
||||||
UpdateFilters();
|
UpdateFilters();
|
||||||
}
|
}
|
||||||
UIWidgets::CVarCheckbox("Show Logic", CVAR_TRACKER_CHECK("ShowLogic"),
|
|
||||||
UIWidgets::CheckboxOptions()
|
|
||||||
.Tooltip("If enabled, will show a check's logic when hovering over it.")
|
|
||||||
.Color(THEME_COLOR));
|
|
||||||
ImGui::BeginDisabled(CVarGetInteger(CVAR_SETTING("DisableChanges"), 0));
|
ImGui::BeginDisabled(CVarGetInteger(CVAR_SETTING("DisableChanges"), 0));
|
||||||
if (UIWidgets::CVarCheckbox("Enable Available Checks", CVAR_TRACKER_CHECK("EnableAvailableChecks"),
|
if (UIWidgets::CVarCheckbox("Enable Available Checks", CVAR_TRACKER_CHECK("EnableAvailableChecks"),
|
||||||
UIWidgets::CheckboxOptions()
|
UIWidgets::CheckboxOptions()
|
||||||
|
@ -2172,6 +2158,12 @@ void CheckTrackerSettingsWindow::DrawElement() {
|
||||||
enableAvailableChecks = CVarGetInteger(CVAR_TRACKER_CHECK("EnableAvailableChecks"), 0);
|
enableAvailableChecks = CVarGetInteger(CVAR_TRACKER_CHECK("EnableAvailableChecks"), 0);
|
||||||
RecalculateAvailableChecks();
|
RecalculateAvailableChecks();
|
||||||
}
|
}
|
||||||
|
if (enableAvailableChecks) {
|
||||||
|
UIWidgets::CVarCheckbox("Show Logic", CVAR_TRACKER_CHECK("ShowLogic"),
|
||||||
|
UIWidgets::CheckboxOptions()
|
||||||
|
.Tooltip("If enabled, will add a button to show a check's logic.")
|
||||||
|
.Color(THEME_COLOR));
|
||||||
|
}
|
||||||
ImGui::EndDisabled();
|
ImGui::EndDisabled();
|
||||||
|
|
||||||
// Filtering settings
|
// Filtering settings
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue