diff options
Diffstat (limited to 'src/area_popup.cpp')
-rw-r--r-- | src/area_popup.cpp | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/src/area_popup.cpp b/src/area_popup.cpp index a3ac588..28554d0 100644 --- a/src/area_popup.cpp +++ b/src/area_popup.cpp | |||
@@ -5,7 +5,7 @@ | |||
5 | #include "tracker_state.h" | 5 | #include "tracker_state.h" |
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 | : wxScrolledWindow(parent, wxID_ANY), area_id_(area_id) { |
9 | const MapArea& map_area = GD_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); |
@@ -34,6 +34,7 @@ AreaPopup::AreaPopup(wxWindow* parent, int area_id) | |||
34 | top_sizer->Add(section_sizer, wxSizerFlags().DoubleBorder(wxALL).Expand()); | 34 | top_sizer->Add(section_sizer, wxSizerFlags().DoubleBorder(wxALL).Expand()); |
35 | 35 | ||
36 | SetSizerAndFit(top_sizer); | 36 | SetSizerAndFit(top_sizer); |
37 | SetScrollRate(5, 5); | ||
37 | 38 | ||
38 | SetBackgroundColour(*wxBLACK); | 39 | SetBackgroundColour(*wxBLACK); |
39 | Hide(); | 40 | Hide(); |
@@ -44,18 +45,16 @@ void AreaPopup::UpdateIndicators() { | |||
44 | for (int section_id = 0; section_id < map_area.locations.size(); | 45 | for (int section_id = 0; section_id < map_area.locations.size(); |
45 | section_id++) { | 46 | section_id++) { |
46 | const Location& location = map_area.locations.at(section_id); | 47 | const Location& location = map_area.locations.at(section_id); |
47 | if (location.exclude_reduce) { | 48 | wxSizer* container_sizer = |
48 | wxSizer* container_sizer = | 49 | section_labels_[section_id]->GetContainingSizer(); |
49 | section_labels_[section_id]->GetContainingSizer(); | ||
50 | 50 | ||
51 | if (AP_IsReduceChecks()) { | 51 | if (!AP_IsLocationVisible(location.classification)) { |
52 | container_sizer->Hide(section_labels_[section_id]); | 52 | container_sizer->Hide(section_labels_[section_id]); |
53 | container_sizer->Hide(eye_indicators_[section_id]); | 53 | container_sizer->Hide(eye_indicators_[section_id]); |
54 | continue; | 54 | continue; |
55 | } else { | 55 | } else { |
56 | container_sizer->Show(section_labels_[section_id]); | 56 | container_sizer->Show(section_labels_[section_id]); |
57 | container_sizer->Show(eye_indicators_[section_id]); | 57 | container_sizer->Show(eye_indicators_[section_id]); |
58 | } | ||
59 | } | 58 | } |
60 | 59 | ||
61 | bool checked = AP_HasCheckedGameLocation(area_id_, section_id); | 60 | bool checked = AP_HasCheckedGameLocation(area_id_, section_id); |