diff options
author | Star Rauchenberger <fefferburbia@gmail.com> | 2023-05-05 16:35:09 -0400 |
---|---|---|
committer | Star Rauchenberger <fefferburbia@gmail.com> | 2023-05-05 16:35:09 -0400 |
commit | d7212d755dca7f4fd99cf4b775cd0d372d7bcbb2 (patch) | |
tree | a4ca0258eda334c4aa68073355b9f4ccd8a7bdef /src/area_popup.cpp | |
parent | 017df1397ace9ab8c3f152362d07871dcb6858be (diff) | |
download | lingo-ap-tracker-d7212d755dca7f4fd99cf4b775cd0d372d7bcbb2.tar.gz lingo-ap-tracker-d7212d755dca7f4fd99cf4b775cd0d372d7bcbb2.tar.bz2 lingo-ap-tracker-d7212d755dca7f4fd99cf4b775cd0d372d7bcbb2.zip |
Refactored away singletons
(Except TrackerConfig, for now at least)
Diffstat (limited to 'src/area_popup.cpp')
-rw-r--r-- | src/area_popup.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/area_popup.cpp b/src/area_popup.cpp index a8ff612..88dffe0 100644 --- a/src/area_popup.cpp +++ b/src/area_popup.cpp | |||
@@ -6,7 +6,7 @@ | |||
6 | 6 | ||
7 | AreaPopup::AreaPopup(wxWindow* parent, int area_id) | 7 | AreaPopup::AreaPopup(wxWindow* parent, int area_id) |
8 | : wxPanel(parent, wxID_ANY), area_id_(area_id) { | 8 | : wxPanel(parent, wxID_ANY), area_id_(area_id) { |
9 | const MapArea& map_area = GetGameData().GetMapArea(area_id); | 9 | const MapArea& map_area = GD_GetMapArea(area_id); |
10 | 10 | ||
11 | wxFlexGridSizer* section_sizer = new wxFlexGridSizer(2, 10, 10); | 11 | wxFlexGridSizer* section_sizer = new wxFlexGridSizer(2, 10, 10); |
12 | 12 | ||
@@ -40,12 +40,11 @@ AreaPopup::AreaPopup(wxWindow* parent, int area_id) | |||
40 | } | 40 | } |
41 | 41 | ||
42 | void AreaPopup::UpdateIndicators() { | 42 | void AreaPopup::UpdateIndicators() { |
43 | const MapArea& map_area = GetGameData().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 | bool checked = AP_HasCheckedGameLocation(area_id_, section_id); | 46 | bool checked = AP_HasCheckedGameLocation(area_id_, section_id); |
47 | bool reachable = | 47 | bool reachable = IsLocationReachable(area_id_, section_id); |
48 | GetTrackerState().IsLocationReachable(area_id_, section_id); | ||
49 | const wxColour* text_color = reachable ? wxWHITE : wxRED; | 48 | const wxColour* text_color = reachable ? wxWHITE : wxRED; |
50 | 49 | ||
51 | section_labels_[section_id]->SetForegroundColour(*text_color); | 50 | section_labels_[section_id]->SetForegroundColour(*text_color); |