#ifndef SUBWAY_MAP_H_BD2D843E #define SUBWAY_MAP_H_BD2D843E #include #ifndef WX_PRECOMP #include #endif #include #include #include #include #include #include #include "game_data.h" #include "network_set.h" class SubwayMap : public wxPanel { public: SubwayMap(wxWindow *parent); void OnConnect(); void UpdateIndicators(); void UpdateSunwarp(SubwaySunwarp from_sunwarp, SubwaySunwarp to_sunwarp); void Zoom(bool in); private: void OnPaint(wxPaintEvent &event); void OnMouseMove(wxMouseEvent &event); void OnMouseScroll(wxMouseEvent &event); void OnMouseLeave(wxMouseEvent &event); void OnMouseClick(wxMouseEvent &event); void OnTimer(wxTimerEvent &event); void OnZoomSlide(wxCommandEvent &event); void OnClickHelp(wxCommandEvent &event); void Redraw(); void SetUpHelpButton(); wxPoint MapPosToRenderPos(wxPoint pos) const; wxPoint MapPosToVirtualPos(wxPoint pos) const; wxPoint RenderPosToMapPos(wxPoint pos) const; void EvaluateScroll(wxPoint pos); void SetZoomPos(wxPoint pos); void SetScrollSpeed(int scroll_x, int scroll_y); void SetZoom(double zoom, wxPoint static_point); wxImage map_image_; wxImage owl_image_; wxBitmap unchecked_eye_; wxBitmap checked_eye_; wxBitmap rendered_; int render_x_ = 0; int render_y_ = 0; int render_width_ = 1; int render_height_ = 1; double zoom_ = 1.0; int zoom_x_ = 0; // in render space int zoom_y_ = 0; bool scroll_mode_ = false; wxTimer* scroll_timer_; int scroll_x_ = 0; int scroll_y_ = 0; wxSlider *zoom_slider_; wxButton *help_button_; std::optional mouse_position_; struct GetItemBox { quadtree::Box operator()(const int &id) const; }; std::unique_ptr> tree_; std::optional hovered_item_; std::optional actual_hover_; bool sticky_hover_ = false; NetworkSet networks_; std::set checked_paintings_; }; #endif /* end of include guard: SUBWAY_MAP_H_BD2D843E */ fbbded3b8086e370b6f4c20d084a5d68'/>
blob: 1aa7dcf0670eafe03170166eb7c87b58e6ce25b4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99