about summary refs log tree commit diff stats
path: root/src/tracker_frame.cpp
diff options
context:
space:
mode:
authorStar Rauchenberger <fefferburbia@gmail.com>2023-05-21 13:16:25 -0400
committerStar Rauchenberger <fefferburbia@gmail.com>2023-05-21 13:16:25 -0400
commitbb12ecd88fe16e4009b0d8927c5653d72972e284 (patch)
tree69e2e23b43605ffa24fe2c64251a1fab8ff0dfd7 /src/tracker_frame.cpp
parent0e69963e29fd7e3f9e4bdf876246c400d2f07f19 (diff)
downloadlingo-ap-tracker-bb12ecd88fe16e4009b0d8927c5653d72972e284.tar.gz
lingo-ap-tracker-bb12ecd88fe16e4009b0d8927c5653d72972e284.tar.bz2
lingo-ap-tracker-bb12ecd88fe16e4009b0d8927c5653d72972e284.zip
Show list of achievements on the side
Diffstat (limited to 'src/tracker_frame.cpp')
-rw-r--r--src/tracker_frame.cpp13
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
114void TrackerFrame::OnStateChanged(wxCommandEvent &event) { 126void TrackerFrame::OnStateChanged(wxCommandEvent &event) {
115 tracker_panel_->UpdateIndicators(); 127 tracker_panel_->UpdateIndicators();
128 achievements_pane_->UpdateIndicators();
116 Refresh(); 129 Refresh();
117} 130}
118 131