diff options
Diffstat (limited to 'src/tracker_panel.cpp')
| -rw-r--r-- | src/tracker_panel.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
| diff --git a/src/tracker_panel.cpp b/src/tracker_panel.cpp index 5f9f8ea..66bce81 100644 --- a/src/tracker_panel.cpp +++ b/src/tracker_panel.cpp | |||
| @@ -1,5 +1,7 @@ | |||
| 1 | #include "tracker_panel.h" | 1 | #include "tracker_panel.h" |
| 2 | 2 | ||
| 3 | #include <wx/dcbuffer.h> | ||
| 4 | |||
| 3 | #include "ap_state.h" | 5 | #include "ap_state.h" |
| 4 | #include "area_popup.h" | 6 | #include "area_popup.h" |
| 5 | #include "game_data.h" | 7 | #include "game_data.h" |
| @@ -13,6 +15,8 @@ constexpr int AREA_EFFECTIVE_SIZE = AREA_ACTUAL_SIZE + AREA_BORDER_SIZE * 2; | |||
| 13 | constexpr int PLAYER_SIZE = 96; | 15 | constexpr int PLAYER_SIZE = 96; |
| 14 | 16 | ||
| 15 | TrackerPanel::TrackerPanel(wxWindow *parent) : wxPanel(parent, wxID_ANY) { | 17 | TrackerPanel::TrackerPanel(wxWindow *parent) : wxPanel(parent, wxID_ANY) { |
| 18 | SetBackgroundStyle(wxBG_STYLE_PAINT); | ||
| 19 | |||
| 16 | map_image_ = wxImage(GetAbsolutePath("assets/lingo_map.png").c_str(), | 20 | map_image_ = wxImage(GetAbsolutePath("assets/lingo_map.png").c_str(), |
| 17 | wxBITMAP_TYPE_PNG); | 21 | wxBITMAP_TYPE_PNG); |
| 18 | if (!map_image_.IsOk()) { | 22 | if (!map_image_.IsOk()) { |
| @@ -54,7 +58,7 @@ void TrackerPanel::OnPaint(wxPaintEvent &event) { | |||
| 54 | Redraw(); | 58 | Redraw(); |
| 55 | } | 59 | } |
| 56 | 60 | ||
| 57 | wxPaintDC dc(this); | 61 | wxBufferedPaintDC dc(this); |
| 58 | dc.DrawBitmap(rendered_, 0, 0); | 62 | dc.DrawBitmap(rendered_, 0, 0); |
| 59 | 63 | ||
| 60 | if (AP_GetPlayerPosition().has_value()) { | 64 | if (AP_GetPlayerPosition().has_value()) { |
