diff options
author | Star Rauchenberger <fefferburbia@gmail.com> | 2023-08-25 22:14:51 -0400 |
---|---|---|
committer | Star Rauchenberger <fefferburbia@gmail.com> | 2023-08-25 22:14:51 -0400 |
commit | 9bf6a50624284ab7422f56375b3e57c894200faf (patch) | |
tree | 9951ee08e5ebbed1363d190b57fa01606e0fbb94 /src/area_popup.cpp | |
parent | baf43ede759f9ff0ca8c71de764e0389469f9ae1 (diff) | |
download | lingo-ap-tracker-9bf6a50624284ab7422f56375b3e57c894200faf.tar.gz lingo-ap-tracker-9bf6a50624284ab7422f56375b3e57c894200faf.tar.bz2 lingo-ap-tracker-9bf6a50624284ab7422f56375b3e57c894200faf.zip |
Panelsanity support
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); |