about summary refs log tree commit diff stats
path: root/tracker_panel.cpp
diff options
context:
space:
mode:
authorStar Rauchenberger <fefferburbia@gmail.com>2023-05-02 17:26:46 -0400
committerStar Rauchenberger <fefferburbia@gmail.com>2023-05-02 17:26:46 -0400
commit09d67fbad9df92caf2251d36b4abd7979fd27126 (patch)
tree287be3da3588f1fb991ffd3212fdfd53a703d6ab /tracker_panel.cpp
parent116ba412079ddf647d19a54d09eb61e67a2f9aac (diff)
downloadlingo-ap-tracker-09d67fbad9df92caf2251d36b4abd7979fd27126.tar.gz
lingo-ap-tracker-09d67fbad9df92caf2251d36b4abd7979fd27126.tar.bz2
lingo-ap-tracker-09d67fbad9df92caf2251d36b4abd7979fd27126.zip
Map + popups reflect checked locations
Diffstat (limited to 'tracker_panel.cpp')
-rw-r--r--tracker_panel.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/tracker_panel.cpp b/tracker_panel.cpp index 0e78cc5..1aa7dcf 100644 --- a/tracker_panel.cpp +++ b/tracker_panel.cpp
@@ -13,6 +13,7 @@ TrackerPanel::TrackerPanel(wxWindow *parent) : wxPanel(parent, wxID_ANY) {
13 AreaPopup *area_popup = new AreaPopup(this, map_area.id); 13 AreaPopup *area_popup = new AreaPopup(this, map_area.id);
14 area_popup->SetPosition({0, 0}); 14 area_popup->SetPosition({0, 0});
15 area_popup->Raise(); 15 area_popup->Raise();
16 area_popups_.push_back(area_popup);
16 17
17 AreaWindow *area_window = new AreaWindow(this, map_area.id, area_popup); 18 AreaWindow *area_window = new AreaWindow(this, map_area.id, area_popup);
18 area_window->Lower(); 19 area_window->Lower();
@@ -24,6 +25,18 @@ TrackerPanel::TrackerPanel(wxWindow *parent) : wxPanel(parent, wxID_ANY) {
24 Bind(wxEVT_PAINT, &TrackerPanel::OnPaint, this); 25 Bind(wxEVT_PAINT, &TrackerPanel::OnPaint, this);
25} 26}
26 27
28void TrackerPanel::UpdateIndicators() {
29 Redraw();
30
31 for (AreaWindow *area_window : area_windows_) {
32 area_window->UpdateIndicators();
33 }
34
35 for (AreaPopup *area_popup : area_popups_) {
36 area_popup->UpdateIndicators();
37 }
38}
39
27void TrackerPanel::OnPaint(wxPaintEvent &event) { 40void TrackerPanel::OnPaint(wxPaintEvent &event) {
28 if (GetSize() != rendered_.GetSize()) { 41 if (GetSize() != rendered_.GetSize()) {
29 Redraw(); 42 Redraw();