about summary refs log tree commit diff stats
path: root/src/area_popup.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/area_popup.cpp')
-rw-r--r--src/area_popup.cpp16
1 files changed, 9 insertions, 7 deletions
diff --git a/src/area_popup.cpp b/src/area_popup.cpp index b5c1ccb..58d8897 100644 --- a/src/area_popup.cpp +++ b/src/area_popup.cpp
@@ -66,8 +66,9 @@ void AreaPopup::UpdateIndicators() {
66 } 66 }
67 67
68 if (AP_IsPaintingShuffle()) { 68 if (AP_IsPaintingShuffle()) {
69 for (const PaintingExit& painting : map_area.paintings) { 69 for (int painting_id : map_area.paintings) {
70 wxSize item_extent = mem_dc.GetTextExtent(painting.id); 70 const PaintingExit& painting = GD_GetPaintingExit(painting_id);
71 wxSize item_extent = mem_dc.GetTextExtent(painting.internal_id); // TODO: Replace with a friendly name.
71 int item_height = std::max(32, item_extent.GetHeight()) + 10; 72 int item_height = std::max(32, item_extent.GetHeight()) + 10;
72 acc_height += item_height; 73 acc_height += item_height;
73 74
@@ -123,18 +124,19 @@ void AreaPopup::UpdateIndicators() {
123 } 124 }
124 125
125 if (AP_IsPaintingShuffle()) { 126 if (AP_IsPaintingShuffle()) {
126 for (const PaintingExit& painting : map_area.paintings) { 127 for (int painting_id : map_area.paintings) {
127 bool checked = AP_IsPaintingChecked(painting.id); 128 const PaintingExit& painting = GD_GetPaintingExit(painting_id);
129 bool checked = AP_IsPaintingChecked(painting.internal_id);
128 wxBitmap* eye_ptr = checked ? &checked_eye_ : &unchecked_eye_; 130 wxBitmap* eye_ptr = checked ? &checked_eye_ : &unchecked_eye_;
129 131
130 mem_dc.DrawBitmap(*eye_ptr, {10, cur_height}); 132 mem_dc.DrawBitmap(*eye_ptr, {10, cur_height});
131 133
132 bool reachable = painting.door ? IsDoorOpen(*painting.door) : true; 134 bool reachable = IsPaintingReachable(painting_id);
133 const wxColour* text_color = reachable ? wxWHITE : wxRED; 135 const wxColour* text_color = reachable ? wxWHITE : wxRED;
134 mem_dc.SetTextForeground(*text_color); 136 mem_dc.SetTextForeground(*text_color);
135 137
136 wxSize item_extent = mem_dc.GetTextExtent(painting.id); 138 wxSize item_extent = mem_dc.GetTextExtent(painting.internal_id); // TODO: Replace with friendly name.
137 mem_dc.DrawText(painting.id, 139 mem_dc.DrawText(painting.internal_id,
138 {10 + 32 + 10, 140 {10 + 32 + 10,
139 cur_height + (32 - mem_dc.GetFontMetrics().height) / 2}); 141 cur_height + (32 - mem_dc.GetFontMetrics().height) / 2});
140 142