增加 free camera,支持配置修改,增加图标

This commit is contained in:
chinosk
2024-05-22 23:25:15 +08:00
parent f7239159d0
commit c692684352
48 changed files with 845 additions and 80 deletions

View File

@@ -0,0 +1,24 @@
#include <string>
#include "nlohmann/json.hpp"
#include "../Log.h"
namespace GakumasLocal::Config {
bool isConfigInit = false;
bool enabled = true;
bool enableFreeCamera = false;
void LoadConfig(const std::string& configStr) {
try {
const auto config = nlohmann::json::parse(configStr);
enabled = config["enabled"];
enableFreeCamera = config["enableFreeCamera"];
}
catch (std::exception& e) {
Log::ErrorFmt("LoadConfig error: %s", e.what());
}
isConfigInit = true;
}
}