about summary refs log tree commit diff stats
path: root/src/tracker_panel.h
diff options
context:
space:
mode:
authorStar Rauchenberger <fefferburbia@gmail.com>2025-03-10 13:35:48 -0400
committerStar Rauchenberger <fefferburbia@gmail.com>2025-03-10 13:35:48 -0400
commit0121ce8e79a17336e42ccd14afd9a9c5dbfb29df (patch)
tree5ed1a9431130811259f7eec94eae72b6b05bd8bd /src/tracker_panel.h
parent30f9e78cb30178834c420106c9f515c8358c4dbf (diff)
downloadlingo-ap-tracker-0121ce8e79a17336e42ccd14afd9a9c5dbfb29df.tar.gz
lingo-ap-tracker-0121ce8e79a17336e42ccd14afd9a9c5dbfb29df.tar.bz2
lingo-ap-tracker-0121ce8e79a17336e42ccd14afd9a9c5dbfb29df.zip
Optimized TrackerPanel refresh
Scaling the map image, determining which map areas are active, placing each area indicator, and positioning the area popups now only happen when necessary (the panel is resized / DPI changed, new connection, hunt settings changed). Notably, this means that updating indicators in a regular way such as from clearing locations will not have to resize the image or reposition windows. It will just redraw all of the indicators on the map image.
Diffstat (limited to 'src/tracker_panel.h')
-rw-r--r--src/tracker_panel.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/tracker_panel.h b/src/tracker_panel.h index ae89a35..abab1bf 100644 --- a/src/tracker_panel.h +++ b/src/tracker_panel.h
@@ -44,6 +44,7 @@ class TrackerPanel : public wxPanel {
44 void OnMouseMove(wxMouseEvent &event); 44 void OnMouseMove(wxMouseEvent &event);
45 void OnRefreshSavedata(wxCommandEvent &event); 45 void OnRefreshSavedata(wxCommandEvent &event);
46 46
47 void Resize();
47 void Redraw(); 48 void Redraw();
48 49
49 void RefreshSavedata(); 50 void RefreshSavedata();
@@ -52,6 +53,7 @@ class TrackerPanel : public wxPanel {
52 53
53 wxImage map_image_; 54 wxImage map_image_;
54 wxImage player_image_; 55 wxImage player_image_;
56 wxBitmap scaled_map_;
55 wxBitmap rendered_; 57 wxBitmap rendered_;
56 wxBitmap scaled_player_; 58 wxBitmap scaled_player_;
57 59
@@ -61,6 +63,7 @@ class TrackerPanel : public wxPanel {
61 int offset_y_ = 0; 63 int offset_y_ = 0;
62 double scale_x_ = 0; 64 double scale_x_ = 0;
63 double scale_y_ = 0; 65 double scale_y_ = 0;
66 int real_area_size_ = 0;
64 67
65 std::vector<AreaIndicator> areas_; 68 std::vector<AreaIndicator> areas_;
66 69