mirror of
https://github.com/WerWolv/ImHex.git
synced 2026-03-30 05:05:19 -05:00
@@ -109,6 +109,15 @@ namespace hex {
|
||||
return SharedData::settingsEntries;
|
||||
}
|
||||
|
||||
std::optional<nlohmann::json> ContentRegistry::Settings::getSetting(std::string_view unlocalizedCategory, std::string_view unlocalizedName) {
|
||||
auto &settings = getSettingsData();
|
||||
|
||||
if (!settings.contains(unlocalizedCategory)) return { };
|
||||
if (!settings[unlocalizedCategory.data()].contains(unlocalizedName)) return { };
|
||||
|
||||
return settings[unlocalizedCategory.data()][unlocalizedName.data()];
|
||||
}
|
||||
|
||||
nlohmann::json& ContentRegistry::Settings::getSettingsData() {
|
||||
return SharedData::settingsJson;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user