about summary refs log tree commit diff stats
path: root/src/area_popup.cpp
diff options
context:
space:
mode:
authorStar Rauchenberger <fefferburbia@gmail.com>2023-05-09 11:14:10 -0400
committerStar Rauchenberger <fefferburbia@gmail.com>2023-05-09 11:14:10 -0400
commit53a2ec277f20a7c260e80af527659e769f6d2ac6 (patch)
tree93527b1a1458352aa2d35916a3621cd144d48e0c /src/area_popup.cpp
parent884549457f8f5d9a13fd575ddf70aa317cd752ed (diff)
downloadlingo-ap-tracker-53a2ec277f20a7c260e80af527659e769f6d2ac6.tar.gz
lingo-ap-tracker-53a2ec277f20a7c260e80af527659e769f6d2ac6.tar.bz2
lingo-ap-tracker-53a2ec277f20a7c260e80af527659e769f6d2ac6.zip
Support reduce_checks
Diffstat (limited to 'src/area_popup.cpp')
-rw-r--r--src/area_popup.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/area_popup.cpp b/src/area_popup.cpp index 88dffe0..a3ac588 100644 --- a/src/area_popup.cpp +++ b/src/area_popup.cpp
@@ -43,6 +43,21 @@ void AreaPopup::UpdateIndicators() {
43 const MapArea& map_area = GD_GetMapArea(area_id_); 43 const MapArea& map_area = GD_GetMapArea(area_id_);
44 for (int section_id = 0; section_id < map_area.locations.size(); 44 for (int section_id = 0; section_id < map_area.locations.size();
45 section_id++) { 45 section_id++) {
46 const Location& location = map_area.locations.at(section_id);
47 if (location.exclude_reduce) {
48 wxSizer* container_sizer =
49 section_labels_[section_id]->GetContainingSizer();
50
51 if (AP_IsReduceChecks()) {
52 container_sizer->Hide(section_labels_[section_id]);
53 container_sizer->Hide(eye_indicators_[section_id]);
54 continue;
55 } else {
56 container_sizer->Show(section_labels_[section_id]);
57 container_sizer->Show(eye_indicators_[section_id]);
58 }
59 }
60
46 bool checked = AP_HasCheckedGameLocation(area_id_, section_id); 61 bool checked = AP_HasCheckedGameLocation(area_id_, section_id);
47 bool reachable = IsLocationReachable(area_id_, section_id); 62 bool reachable = IsLocationReachable(area_id_, section_id);
48 const wxColour* text_color = reachable ? wxWHITE : wxRED; 63 const wxColour* text_color = reachable ? wxWHITE : wxRED;
@@ -50,4 +65,7 @@ void AreaPopup::UpdateIndicators() {
50 section_labels_[section_id]->SetForegroundColour(*text_color); 65 section_labels_[section_id]->SetForegroundColour(*text_color);
51 eye_indicators_[section_id]->SetChecked(checked); 66 eye_indicators_[section_id]->SetChecked(checked);
52 } 67 }
68
69 section_labels_[0]->GetContainingSizer()->Layout();
70 GetSizer()->Fit(this);
53} 71}