|
@@ -53,13 +53,8 @@ bool preferDarkPanels = false; |
|
|
float autosaveInterval = 15.0; |
|
|
float autosaveInterval = 15.0; |
|
|
bool skipLoadOnLaunch = false; |
|
|
bool skipLoadOnLaunch = false; |
|
|
std::list<std::string> recentPatchPaths; |
|
|
std::list<std::string> recentPatchPaths; |
|
|
std::vector<NVGcolor> cableColors = { |
|
|
|
|
|
color::fromHexString("#f3374b"), // red |
|
|
|
|
|
color::fromHexString("#ffb437"), // yellow |
|
|
|
|
|
color::fromHexString("#00b56e"), // green |
|
|
|
|
|
color::fromHexString("#3695ef"), // blue |
|
|
|
|
|
color::fromHexString("#8b4ade"), // purple |
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
bool cableAutoRotate = true; |
|
|
|
|
|
std::vector<NVGcolor> cableColors; |
|
|
bool autoCheckUpdates = true; |
|
|
bool autoCheckUpdates = true; |
|
|
bool verifyHttpsCerts = true; |
|
|
bool verifyHttpsCerts = true; |
|
|
bool showTipsOnLaunch = true; |
|
|
bool showTipsOnLaunch = true; |
|
@@ -99,8 +94,20 @@ bool isModuleWhitelisted(const std::string& pluginSlug, const std::string& modul |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void cableColorsReset() { |
|
|
|
|
|
cableColors = { |
|
|
|
|
|
color::fromHexString("#f3374b"), // red |
|
|
|
|
|
color::fromHexString("#ffb437"), // yellow |
|
|
|
|
|
color::fromHexString("#00b56e"), // green |
|
|
|
|
|
color::fromHexString("#3695ef"), // blue |
|
|
|
|
|
color::fromHexString("#8b4ade"), // purple |
|
|
|
|
|
}; |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void init() { |
|
|
void init() { |
|
|
settingsPath = asset::user("settings.json"); |
|
|
settingsPath = asset::user("settings.json"); |
|
|
|
|
|
cableColorsReset(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
@@ -186,6 +193,8 @@ json_t* toJson() { |
|
|
} |
|
|
} |
|
|
json_object_set_new(rootJ, "cableColors", cableColorsJ); |
|
|
json_object_set_new(rootJ, "cableColors", cableColorsJ); |
|
|
|
|
|
|
|
|
|
|
|
json_object_set_new(rootJ, "cableAutoRotate", json_boolean(cableAutoRotate)); |
|
|
|
|
|
|
|
|
json_object_set_new(rootJ, "autoCheckUpdates", json_boolean(autoCheckUpdates)); |
|
|
json_object_set_new(rootJ, "autoCheckUpdates", json_boolean(autoCheckUpdates)); |
|
|
|
|
|
|
|
|
json_object_set_new(rootJ, "verifyHttpsCerts", json_boolean(verifyHttpsCerts)); |
|
|
json_object_set_new(rootJ, "verifyHttpsCerts", json_boolean(verifyHttpsCerts)); |
|
@@ -410,6 +419,10 @@ void fromJson(json_t* rootJ) { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
json_t* cableAutoRotateJ = json_object_get(rootJ, "cableAutoRotate"); |
|
|
|
|
|
if (cableAutoRotateJ) |
|
|
|
|
|
cableAutoRotate = json_boolean_value(cableAutoRotateJ); |
|
|
|
|
|
|
|
|
json_t* autoCheckUpdatesJ = json_object_get(rootJ, "autoCheckUpdates"); |
|
|
json_t* autoCheckUpdatesJ = json_object_get(rootJ, "autoCheckUpdates"); |
|
|
if (autoCheckUpdatesJ) |
|
|
if (autoCheckUpdatesJ) |
|
|
autoCheckUpdates = json_boolean_value(autoCheckUpdatesJ); |
|
|
autoCheckUpdates = json_boolean_value(autoCheckUpdatesJ); |
|
|