about summary refs log tree commit diff stats
path: root/src/tracker_config.cpp
diff options
context:
space:
mode:
authorStar Rauchenberger <fefferburbia@gmail.com>2023-11-17 11:43:13 -0500
committerStar Rauchenberger <fefferburbia@gmail.com>2023-11-17 11:43:13 -0500
commit4adfe42a300a597cf8e7036cd189d197b08a7f01 (patch)
tree684a9f825bc1ae919ea68049a941f6190b8b4f96 /src/tracker_config.cpp
parenta9bc708c7eeeada4c59952ce71aa071175f8f27d (diff)
downloadlingo-ap-tracker-4adfe42a300a597cf8e7036cd189d197b08a7f01.tar.gz
lingo-ap-tracker-4adfe42a300a597cf8e7036cd189d197b08a7f01.tar.bz2
lingo-ap-tracker-4adfe42a300a597cf8e7036cd189d197b08a7f01.zip
Show hunt panels option
Diffstat (limited to 'src/tracker_config.cpp')
-rw-r--r--src/tracker_config.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/tracker_config.cpp b/src/tracker_config.cpp index 9318091..11e1cec 100644 --- a/src/tracker_config.cpp +++ b/src/tracker_config.cpp
@@ -1,8 +1,9 @@
1#include "tracker_config.h" 1#include "tracker_config.h"
2 2
3#include <fstream>
4#include <yaml-cpp/yaml.h> 3#include <yaml-cpp/yaml.h>
5 4
5#include <fstream>
6
6constexpr const char* CONFIG_FILE_NAME = "config.yaml"; 7constexpr const char* CONFIG_FILE_NAME = "config.yaml";
7 8
8void TrackerConfig::Load() { 9void TrackerConfig::Load() {
@@ -15,6 +16,7 @@ void TrackerConfig::Load() {
15 asked_to_check_for_updates = file["asked_to_check_for_updates"].as<bool>(); 16 asked_to_check_for_updates = file["asked_to_check_for_updates"].as<bool>();
16 should_check_for_updates = file["should_check_for_updates"].as<bool>(); 17 should_check_for_updates = file["should_check_for_updates"].as<bool>();
17 hybrid_areas = file["hybrid_areas"].as<bool>(); 18 hybrid_areas = file["hybrid_areas"].as<bool>();
19 show_hunt_panels = file["show_hunt_panels"].as<bool>();
18 } catch (const std::exception&) { 20 } catch (const std::exception&) {
19 // It's fine if the file can't be loaded. 21 // It's fine if the file can't be loaded.
20 } 22 }
@@ -28,6 +30,7 @@ void TrackerConfig::Save() {
28 output["asked_to_check_for_updates"] = asked_to_check_for_updates; 30 output["asked_to_check_for_updates"] = asked_to_check_for_updates;
29 output["should_check_for_updates"] = should_check_for_updates; 31 output["should_check_for_updates"] = should_check_for_updates;
30 output["hybrid_areas"] = hybrid_areas; 32 output["hybrid_areas"] = hybrid_areas;
33 output["show_hunt_panels"] = show_hunt_panels;
31 34
32 std::ofstream filewriter(CONFIG_FILE_NAME); 35 std::ofstream filewriter(CONFIG_FILE_NAME);
33 filewriter << output; 36 filewriter << output;