diff options
author | Star Rauchenberger <fefferburbia@gmail.com> | 2023-11-17 10:11:41 -0500 |
---|---|---|
committer | Star Rauchenberger <fefferburbia@gmail.com> | 2023-11-17 10:11:41 -0500 |
commit | a9bc708c7eeeada4c59952ce71aa071175f8f27d (patch) | |
tree | b55d7ae50b2e96a44319ba7ec97cebe32fe2febf /src/settings_dialog.cpp | |
parent | 2ee15755735ff6243d3e3b1c2ade4d9bbe0b6dc6 (diff) | |
download | lingo-ap-tracker-a9bc708c7eeeada4c59952ce71aa071175f8f27d.tar.gz lingo-ap-tracker-a9bc708c7eeeada4c59952ce71aa071175f8f27d.tar.bz2 lingo-ap-tracker-a9bc708c7eeeada4c59952ce71aa071175f8f27d.zip |
Added hybrid areas and settings dialog
Diffstat (limited to 'src/settings_dialog.cpp')
-rw-r--r-- | src/settings_dialog.cpp | 29 |
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 | |||
5 | SettingsDialog::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 | } | ||