mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-15 00:05:02 +02:00
add persistent storage & completed campaign support
This commit is contained in:
@ -35,6 +35,9 @@ class DLL_LINKAGE SettingsStorage
|
||||
std::set<SettingsListener*> listeners;
|
||||
JsonNode config;
|
||||
|
||||
bool persistentStorage;
|
||||
std::string cfgName;
|
||||
|
||||
JsonNode & getNode(const std::vector<std::string> & path);
|
||||
|
||||
// Calls all required listeners
|
||||
@ -45,7 +48,7 @@ class DLL_LINKAGE SettingsStorage
|
||||
public:
|
||||
// Initialize config structure
|
||||
SettingsStorage();
|
||||
void init();
|
||||
void init(bool persistent = false);
|
||||
|
||||
// Get write access to config node at path
|
||||
const NodeAccessor<Settings> write;
|
||||
@ -113,5 +116,6 @@ public:
|
||||
};
|
||||
|
||||
extern DLL_LINKAGE SettingsStorage settings;
|
||||
extern DLL_LINKAGE SettingsStorage persistent;
|
||||
|
||||
VCMI_LIB_NAMESPACE_END
|
||||
|
Reference in New Issue
Block a user