mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-04-02 05:27:41 -05:00
Allow reading and writing settings through code
This commit is contained in:
@@ -42,6 +42,14 @@ namespace hex {
|
||||
static void add(std::string_view category, std::string_view name, s64 defaultValue, const std::function<bool(nlohmann::json&)> &callback);
|
||||
static void add(std::string_view category, std::string_view name, std::string_view defaultValue, const std::function<bool(nlohmann::json&)> &callback);
|
||||
|
||||
static void write(std::string_view category, std::string_view name, s64 value);
|
||||
static void write(std::string_view category, std::string_view name, std::string_view value);
|
||||
static void write(std::string_view category, std::string_view name, const std::vector<std::string>& value);
|
||||
|
||||
static s64 read(std::string_view category, std::string_view name, s64 defaultValue);
|
||||
static std::string read(std::string_view category, std::string_view name, std::string_view defaultValue);
|
||||
static std::vector<std::string> read(std::string_view category, std::string_view name, const std::vector<std::string>& defaultValue = { });
|
||||
|
||||
static std::map<std::string, std::vector<Entry>>& getEntries();
|
||||
static nlohmann::json& getSettingsData();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user