From 3cea704b86a60be2178d1faf5e1be0f927a8c56d Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Wed, 17 Jul 2024 14:11:08 -0400 Subject: Don't show unreachable paintings as checked --- src/area_popup.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/area_popup.cpp') diff --git a/src/area_popup.cpp b/src/area_popup.cpp index 58d8897..ca3b352 100644 --- a/src/area_popup.cpp +++ b/src/area_popup.cpp @@ -126,15 +126,15 @@ void AreaPopup::UpdateIndicators() { if (AP_IsPaintingShuffle()) { for (int painting_id : map_area.paintings) { const PaintingExit& painting = GD_GetPaintingExit(painting_id); - bool checked = AP_IsPaintingChecked(painting.internal_id); - wxBitmap* eye_ptr = checked ? &checked_eye_ : &unchecked_eye_; - - mem_dc.DrawBitmap(*eye_ptr, {10, cur_height}); bool reachable = IsPaintingReachable(painting_id); const wxColour* text_color = reachable ? wxWHITE : wxRED; mem_dc.SetTextForeground(*text_color); + bool checked = reachable && AP_IsPaintingChecked(painting.internal_id); + wxBitmap* eye_ptr = checked ? &checked_eye_ : &unchecked_eye_; + mem_dc.DrawBitmap(*eye_ptr, {10, cur_height}); + wxSize item_extent = mem_dc.GetTextExtent(painting.internal_id); // TODO: Replace with friendly name. mem_dc.DrawText(painting.internal_id, {10 + 32 + 10, -- cgit 1.4.1