diff options
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 0308886..49f947f 100644 --- a/src/tracker_frame.cpp +++ b/src/tracker_frame.cpp | |||
@@ -1,10 +1,12 @@ | |||
1 | #include "tracker_frame.h" | 1 | #include "tracker_frame.h" |
2 | 2 | ||
3 | #include <wx/choicebk.h> | ||
3 | #include <wx/webrequest.h> | 4 | #include <wx/webrequest.h> |
4 | 5 | ||
5 | #include <nlohmann/json.hpp> | 6 | #include <nlohmann/json.hpp> |
6 | #include <sstream> | 7 | #include <sstream> |
7 | 8 | ||
9 | #include "achievements_pane.h" | ||
8 | #include "ap_state.h" | 10 | #include "ap_state.h" |
9 | #include "connection_dialog.h" | 11 | #include "connection_dialog.h" |
10 | #include "tracker_config.h" | 12 | #include "tracker_config.h" |
@@ -50,8 +52,18 @@ TrackerFrame::TrackerFrame() | |||
50 | Bind(STATE_CHANGED, &TrackerFrame::OnStateChanged, this); | 52 | Bind(STATE_CHANGED, &TrackerFrame::OnStateChanged, this); |
51 | Bind(STATUS_CHANGED, &TrackerFrame::OnStatusChanged, this); | 53 | Bind(STATUS_CHANGED, &TrackerFrame::OnStatusChanged, this); |
52 | 54 | ||
55 | wxChoicebook *choicebook = new wxChoicebook(this, wxID_ANY); | ||
56 | achievements_pane_ = new AchievementsPane(this); | ||
57 | choicebook->AddPage(achievements_pane_, "Achievements"); | ||
58 | |||
53 | tracker_panel_ = new TrackerPanel(this); | 59 | tracker_panel_ = new TrackerPanel(this); |
54 | 60 | ||
61 | wxBoxSizer *top_sizer = new wxBoxSizer(wxHORIZONTAL); | ||
62 | top_sizer->Add(choicebook, wxSizerFlags().Expand().Proportion(1)); | ||
63 | top_sizer->Add(tracker_panel_, wxSizerFlags().Expand().Proportion(3)); | ||
64 | |||
65 | SetSizerAndFit(top_sizer); | ||
66 | |||
55 | if (!GetTrackerConfig().asked_to_check_for_updates) { | 67 | if (!GetTrackerConfig().asked_to_check_for_updates) { |
56 | GetTrackerConfig().asked_to_check_for_updates = true; | 68 | GetTrackerConfig().asked_to_check_for_updates = true; |
57 | 69 | ||
@@ -113,6 +125,7 @@ void TrackerFrame::OnCheckForUpdates(wxCommandEvent &event) { | |||
113 | 125 | ||
114 | void TrackerFrame::OnStateChanged(wxCommandEvent &event) { | 126 | void TrackerFrame::OnStateChanged(wxCommandEvent &event) { |
115 | tracker_panel_->UpdateIndicators(); | 127 | tracker_panel_->UpdateIndicators(); |
128 | achievements_pane_->UpdateIndicators(); | ||
116 | Refresh(); | 129 | Refresh(); |
117 | } | 130 | } |
118 | 131 | ||