about summary refs log tree commit diff stats
path: root/src/subway_map.cpp
diff options
context:
space:
mode:
authorStar Rauchenberger <fefferburbia@gmail.com>2024-06-06 14:07:51 -0400
committerStar Rauchenberger <fefferburbia@gmail.com>2024-06-06 14:07:51 -0400
commitb78a7361c9f9f4a9edc30b45a90a3ff94e919b19 (patch)
tree4e924a251d240f89d77b2b1021425f845b3627c8 /src/subway_map.cpp
parent67a2efe7be6f4872adca8d944ebf403046472a98 (diff)
downloadlingo-ap-tracker-b78a7361c9f9f4a9edc30b45a90a3ff94e919b19.tar.gz
lingo-ap-tracker-b78a7361c9f9f4a9edc30b45a90a3ff94e919b19.tar.bz2
lingo-ap-tracker-b78a7361c9f9f4a9edc30b45a90a3ff94e919b19.zip
Added help button for subway map
Diffstat (limited to 'src/subway_map.cpp')
-rw-r--r--src/subway_map.cpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/subway_map.cpp b/src/subway_map.cpp index 77f6ae6..100d351 100644 --- a/src/subway_map.cpp +++ b/src/subway_map.cpp
@@ -58,6 +58,10 @@ SubwayMap::SubwayMap(wxWindow *parent) : wxPanel(parent, wxID_ANY) {
58 58
59 zoom_slider_ = new wxSlider(this, wxID_ANY, 0, 0, 8, {15, 15}); 59 zoom_slider_ = new wxSlider(this, wxID_ANY, 0, 0, 8, {15, 15});
60 zoom_slider_->Bind(wxEVT_SLIDER, &SubwayMap::OnZoomSlide, this); 60 zoom_slider_->Bind(wxEVT_SLIDER, &SubwayMap::OnZoomSlide, this);
61
62 help_button_ = new wxButton(this, wxID_ANY, "Help");
63 help_button_->Bind(wxEVT_BUTTON, &SubwayMap::OnClickHelp, this);
64 SetUpHelpButton();
61} 65}
62 66
63void SubwayMap::OnConnect() { 67void SubwayMap::OnConnect() {
@@ -162,6 +166,8 @@ void SubwayMap::OnPaint(wxPaintEvent &event) {
162 } 166 }
163 167
164 SetZoomPos({zoom_x_, zoom_y_}); 168 SetZoomPos({zoom_x_, zoom_y_});
169
170 SetUpHelpButton();
165 } 171 }
166 172
167 wxBufferedPaintDC dc(this); 173 wxBufferedPaintDC dc(this);
@@ -440,6 +446,18 @@ void SubwayMap::OnZoomSlide(wxCommandEvent &event) {
440 } 446 }
441} 447}
442 448
449void SubwayMap::OnClickHelp(wxCommandEvent &event) {
450 wxMessageBox(
451 "Zoom in/out using the mouse wheel, Ctrl +/-, or the slider in the "
452 "corner.\nClick on a side of the screen to start panning. It will follow "
453 "your mouse. Click again to stop.\nHover over a door to see the "
454 "requirements to open it.\nHover over a warp or active painting to see "
455 "what it is connected to.\nIn painting shuffle, paintings that have not "
456 "yet been checked will not show their connections.\nClick on a door or "
457 "warp to make the popup stick until you click again.",
458 "Subway Map Help");
459}
460
443void SubwayMap::Redraw() { 461void SubwayMap::Redraw() {
444 rendered_ = wxBitmap(map_image_); 462 rendered_ = wxBitmap(map_image_);
445 463
@@ -514,6 +532,13 @@ void SubwayMap::Redraw() {
514 } 532 }
515} 533}
516 534
535void SubwayMap::SetUpHelpButton() {
536 help_button_->SetPosition({
537 GetSize().GetWidth() - help_button_->GetSize().GetWidth() - 15,
538 15,
539 });
540}
541
517void SubwayMap::EvaluateScroll(wxPoint pos) { 542void SubwayMap::EvaluateScroll(wxPoint pos) {
518 int scroll_x; 543 int scroll_x;
519 int scroll_y; 544 int scroll_y;