mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-08-21 05:43:42 -07:00
Show accessible checks via an icon.
This commit is contained in:
parent
7799336bee
commit
56aa3ba14e
1 changed files with 14 additions and 3 deletions
|
@ -1487,6 +1487,7 @@ void DrawLocation(RandomizerCheck rc) {
|
||||||
Rando::ItemLocation* itemLoc = OTRGlobals::Instance->gRandoContext->GetItemLocation(rc);
|
Rando::ItemLocation* itemLoc = OTRGlobals::Instance->gRandoContext->GetItemLocation(rc);
|
||||||
RandomizerCheckStatus status = itemLoc->GetCheckStatus();
|
RandomizerCheckStatus status = itemLoc->GetCheckStatus();
|
||||||
bool skipped = itemLoc->GetIsSkipped();
|
bool skipped = itemLoc->GetIsSkipped();
|
||||||
|
bool accessible = itemLoc->IsAccessible();
|
||||||
if (status == RCSHOW_COLLECTED) {
|
if (status == RCSHOW_COLLECTED) {
|
||||||
if (!showHidden && hideCollected) {
|
if (!showHidden && hideCollected) {
|
||||||
return;
|
return;
|
||||||
|
@ -1561,7 +1562,7 @@ void DrawLocation(RandomizerCheck rc) {
|
||||||
OTRGlobals::Instance->gRandoContext->GetItemLocation(rc)->SetIsSkipped(false);
|
OTRGlobals::Instance->gRandoContext->GetItemLocation(rc)->SetIsSkipped(false);
|
||||||
areaChecksGotten[loc->GetArea()]--;
|
areaChecksGotten[loc->GetArea()]--;
|
||||||
totalChecksGotten--;
|
totalChecksGotten--;
|
||||||
if (itemLoc->IsAccessible()) {
|
if (accessible) {
|
||||||
areaChecksAccessible[loc->GetArea()]++;
|
areaChecksAccessible[loc->GetArea()]++;
|
||||||
totalChecksAccessible++;
|
totalChecksAccessible++;
|
||||||
}
|
}
|
||||||
|
@ -1569,7 +1570,7 @@ void DrawLocation(RandomizerCheck rc) {
|
||||||
OTRGlobals::Instance->gRandoContext->GetItemLocation(rc)->SetIsSkipped(true);
|
OTRGlobals::Instance->gRandoContext->GetItemLocation(rc)->SetIsSkipped(true);
|
||||||
areaChecksGotten[loc->GetArea()]++;
|
areaChecksGotten[loc->GetArea()]++;
|
||||||
totalChecksGotten++;
|
totalChecksGotten++;
|
||||||
if (itemLoc->IsAccessible()) {
|
if (accessible) {
|
||||||
areaChecksAccessible[loc->GetArea()]--;
|
areaChecksAccessible[loc->GetArea()]--;
|
||||||
totalChecksAccessible--;
|
totalChecksAccessible--;
|
||||||
}
|
}
|
||||||
|
@ -1584,7 +1585,17 @@ void DrawLocation(RandomizerCheck rc) {
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
|
|
||||||
//Draw
|
//Draw
|
||||||
ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(mainColor.r / 255.0f, mainColor.g / 255.0f, mainColor.b / 255.0f, mainColor.a / 255.0f));
|
ImVec4 styleColor(mainColor.r / 255.0f, mainColor.g / 255.0f, mainColor.b / 255.0f, mainColor.a / 255.0f);
|
||||||
|
if (itemLoc->HasObtained()) {
|
||||||
|
ImGui::PushStyleColor(ImGuiCol_Text, ImVec4(0, 0, 0, 0));
|
||||||
|
} else {
|
||||||
|
ImGui::PushStyleColor(ImGuiCol_Text, styleColor);
|
||||||
|
}
|
||||||
|
ImGui::Text("%s", accessible ? ICON_FA_UNLOCK : ICON_FA_LOCK);
|
||||||
|
ImGui::PopStyleColor();
|
||||||
|
ImGui::SameLine();
|
||||||
|
|
||||||
|
ImGui::PushStyleColor(ImGuiCol_Text, styleColor);
|
||||||
ImGui::Text("%s", txt.c_str());
|
ImGui::Text("%s", txt.c_str());
|
||||||
ImGui::PopStyleColor();
|
ImGui::PopStyleColor();
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue