mirror of
https://git.chinosk6.cn/chinosk/gkms-local.git
synced 2026-10-07 07:01:46 +07:00
增加 free camera,支持配置修改,增加图标
This commit is contained in:
48 files changed
+845
-80
No files matched your search
@@ -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;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user