about summary refs log tree commit diff stats
path: root/src/settings_dialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/settings_dialog.cpp')
-rw-r--r--src/settings_dialog.cpp29
1 files changed, 29 insertions, 0 deletions
diff --git a/src/settings_dialog.cpp b/src/settings_dialog.cpp new file mode 100644 index 0000000..58e5988 --- /dev/null +++ b/src/settings_dialog.cpp
@@ -0,0 +1,29 @@
1#include "settings_dialog.h"
2
3#include "tracker_config.h"
4
5SettingsDialog::SettingsDialog() : wxDialog(nullptr, wxID_ANY, "Settings") {
6 should_check_for_updates_box_ = new wxCheckBox(
7 this, wxID_ANY, "Check for updates when the tracker opens");
8 hybrid_areas_box_ = new wxCheckBox(
9 this, wxID_ANY,
10 "Use two colors to show that an area has partial availability");
11
12 should_check_for_updates_box_->SetValue(
13 GetTrackerConfig().should_check_for_updates);
14 hybrid_areas_box_->SetValue(GetTrackerConfig().hybrid_areas);
15
16 wxBoxSizer* form_sizer = new wxBoxSizer(wxVERTICAL);
17
18 form_sizer->Add(should_check_for_updates_box_, wxSizerFlags().HorzBorder());
19 form_sizer->AddSpacer(2);
20
21 form_sizer->Add(hybrid_areas_box_, wxSizerFlags().HorzBorder());
22 form_sizer->AddSpacer(2);
23
24 form_sizer->Add(CreateButtonSizer(wxOK | wxCANCEL), wxSizerFlags().Center());
25
26 SetSizerAndFit(form_sizer);
27
28 Center();
29}