Start on file chooser, page stack

This commit is contained in:
dec05eba
2024-08-22 21:44:06 +02:00
parent ba007c2b69
commit 54c60d9a18
32 changed files with 724 additions and 260 deletions

View File

@@ -12,6 +12,13 @@
#define CONFIG_FILE_VERSION 1
namespace gsr {
static std::optional<KeyValue> parse_key_value(std::string_view line) {
const size_t space_index = line.find(' ');
if(space_index == std::string_view::npos)
return std::nullopt;
return KeyValue{line.substr(0, space_index), line.substr(space_index + 1)};
}
using ConfigValue = std::variant<bool*, std::string*, int32_t*, ConfigHotkey*, std::vector<std::string>*>;
static std::map<std::string_view, ConfigValue> get_config_options(Config &config) {