diff options
author | Star Rauchenberger <fefferburbia@gmail.com> | 2024-05-14 11:41:50 -0400 |
---|---|---|
committer | Star Rauchenberger <fefferburbia@gmail.com> | 2024-05-14 11:41:50 -0400 |
commit | 7f4b6b4f0cb276a7e0868c7e97d862b1feb468d3 (patch) | |
tree | 101ca3148d5470db821d1572c8f795dd5ad61759 /src/tracker_frame.cpp | |
parent | 34133b1e330a7d3c2a3e6a6bcd36deb5f95e8f13 (diff) | |
download | lingo-ap-tracker-7f4b6b4f0cb276a7e0868c7e97d862b1feb468d3.tar.gz lingo-ap-tracker-7f4b6b4f0cb276a7e0868c7e97d862b1feb468d3.tar.bz2 lingo-ap-tracker-7f4b6b4f0cb276a7e0868c7e97d862b1feb468d3.zip |
Hovered connections on subway map!
Diffstat (limited to 'src/tracker_frame.cpp')
-rw-r--r-- | src/tracker_frame.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/tracker_frame.cpp b/src/tracker_frame.cpp index 70fee2d..e944704 100644 --- a/src/tracker_frame.cpp +++ b/src/tracker_frame.cpp | |||
@@ -22,6 +22,7 @@ enum TrackerFrameIds { | |||
22 | ID_SETTINGS = 3 | 22 | ID_SETTINGS = 3 |
23 | }; | 23 | }; |
24 | 24 | ||
25 | wxDEFINE_EVENT(STATE_RESET, wxCommandEvent); | ||
25 | wxDEFINE_EVENT(STATE_CHANGED, wxCommandEvent); | 26 | wxDEFINE_EVENT(STATE_CHANGED, wxCommandEvent); |
26 | wxDEFINE_EVENT(STATUS_CHANGED, wxCommandEvent); | 27 | wxDEFINE_EVENT(STATUS_CHANGED, wxCommandEvent); |
27 | 28 | ||
@@ -56,6 +57,7 @@ TrackerFrame::TrackerFrame() | |||
56 | Bind(wxEVT_MENU, &TrackerFrame::OnSettings, this, ID_SETTINGS); | 57 | Bind(wxEVT_MENU, &TrackerFrame::OnSettings, this, ID_SETTINGS); |
57 | Bind(wxEVT_MENU, &TrackerFrame::OnCheckForUpdates, this, | 58 | Bind(wxEVT_MENU, &TrackerFrame::OnCheckForUpdates, this, |
58 | ID_CHECK_FOR_UPDATES); | 59 | ID_CHECK_FOR_UPDATES); |
60 | Bind(STATE_RESET, &TrackerFrame::OnStateReset, this); | ||
59 | Bind(STATE_CHANGED, &TrackerFrame::OnStateChanged, this); | 61 | Bind(STATE_CHANGED, &TrackerFrame::OnStateChanged, this); |
60 | Bind(STATUS_CHANGED, &TrackerFrame::OnStatusChanged, this); | 62 | Bind(STATUS_CHANGED, &TrackerFrame::OnStatusChanged, this); |
61 | 63 | ||
@@ -103,6 +105,10 @@ void TrackerFrame::SetStatusMessage(std::string message) { | |||
103 | QueueEvent(event); | 105 | QueueEvent(event); |
104 | } | 106 | } |
105 | 107 | ||
108 | void TrackerFrame::ResetIndicators() { | ||
109 | QueueEvent(new wxCommandEvent(STATE_RESET)); | ||
110 | } | ||
111 | |||
106 | void TrackerFrame::UpdateIndicators() { | 112 | void TrackerFrame::UpdateIndicators() { |
107 | QueueEvent(new wxCommandEvent(STATE_CHANGED)); | 113 | QueueEvent(new wxCommandEvent(STATE_CHANGED)); |
108 | } | 114 | } |
@@ -168,6 +174,13 @@ void TrackerFrame::OnCheckForUpdates(wxCommandEvent &event) { | |||
168 | CheckForUpdates(/*manual=*/true); | 174 | CheckForUpdates(/*manual=*/true); |
169 | } | 175 | } |
170 | 176 | ||
177 | void TrackerFrame::OnStateReset(wxCommandEvent& event) { | ||
178 | tracker_panel_->UpdateIndicators(); | ||
179 | achievements_pane_->UpdateIndicators(); | ||
180 | subway_map_->OnConnect(); | ||
181 | Refresh(); | ||
182 | } | ||
183 | |||
171 | void TrackerFrame::OnStateChanged(wxCommandEvent &event) { | 184 | void TrackerFrame::OnStateChanged(wxCommandEvent &event) { |
172 | tracker_panel_->UpdateIndicators(); | 185 | tracker_panel_->UpdateIndicators(); |
173 | achievements_pane_->UpdateIndicators(); | 186 | achievements_pane_->UpdateIndicators(); |