diff options
Diffstat (limited to 'src/subway_map.h')
-rw-r--r-- | src/subway_map.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/subway_map.h b/src/subway_map.h index 0d26d0b..9b0b43f 100644 --- a/src/subway_map.h +++ b/src/subway_map.h | |||
@@ -29,12 +29,19 @@ class SubwayMap : public wxPanel { | |||
29 | private: | 29 | private: |
30 | void OnPaint(wxPaintEvent &event); | 30 | void OnPaint(wxPaintEvent &event); |
31 | void OnMouseMove(wxMouseEvent &event); | 31 | void OnMouseMove(wxMouseEvent &event); |
32 | void OnMouseScroll(wxMouseEvent &event); | ||
33 | void OnMouseLeave(wxMouseEvent &event); | ||
34 | void OnTimer(wxTimerEvent &event); | ||
32 | 35 | ||
33 | void Redraw(); | 36 | void Redraw(); |
34 | 37 | ||
35 | wxPoint MapPosToRenderPos(wxPoint pos) const; | 38 | wxPoint MapPosToRenderPos(wxPoint pos) const; |
39 | wxPoint MapPosToVirtualPos(wxPoint pos) const; | ||
36 | wxPoint RenderPosToMapPos(wxPoint pos) const; | 40 | wxPoint RenderPosToMapPos(wxPoint pos) const; |
37 | 41 | ||
42 | void SetZoomPos(wxPoint pos); | ||
43 | void SetScrollSpeed(int scroll_x, int scroll_y); | ||
44 | |||
38 | wxImage map_image_; | 45 | wxImage map_image_; |
39 | wxImage owl_image_; | 46 | wxImage owl_image_; |
40 | wxBitmap unchecked_eye_; | 47 | wxBitmap unchecked_eye_; |
@@ -46,6 +53,14 @@ class SubwayMap : public wxPanel { | |||
46 | int render_width_ = 0; | 53 | int render_width_ = 0; |
47 | int render_height_ = 0; | 54 | int render_height_ = 0; |
48 | 55 | ||
56 | double zoom_ = 1.0; | ||
57 | int zoom_x_ = 0; // in render space | ||
58 | int zoom_y_ = 0; | ||
59 | |||
60 | wxTimer* scroll_timer_; | ||
61 | int scroll_x_ = 0; | ||
62 | int scroll_y_ = 0; | ||
63 | |||
49 | struct GetItemBox { | 64 | struct GetItemBox { |
50 | quadtree::Box<float> operator()(const int &id) const; | 65 | quadtree::Box<float> operator()(const int &id) const; |
51 | }; | 66 | }; |