diff --git a/lib/libimhex/include/hex/api/content_registry.hpp b/lib/libimhex/include/hex/api/content_registry.hpp index 25b0949ac..99835995c 100644 --- a/lib/libimhex/include/hex/api/content_registry.hpp +++ b/lib/libimhex/include/hex/api/content_registry.hpp @@ -43,13 +43,14 @@ namespace hex { struct Entry { std::string name; + bool requiresRestart; Callback callback; }; struct Category { std::string name; size_t slot = 0; - + bool operator<(const Category &other) const { return name < other.name; } @@ -62,11 +63,11 @@ namespace hex { void load(); void store(); - void add(const std::string &unlocalizedCategory, const std::string &unlocalizedName, i64 defaultValue, const Callback &callback); - void add(const std::string &unlocalizedCategory, const std::string &unlocalizedName, const std::string &defaultValue, const Callback &callback); - void add(const std::string &unlocalizedCategory, const std::string &unlocalizedName, const std::vector &defaultValue, const Callback &callback); + void add(const std::string &unlocalizedCategory, const std::string &unlocalizedName, i64 defaultValue, const Callback &callback, bool requiresRestart = false); + void add(const std::string &unlocalizedCategory, const std::string &unlocalizedName, const std::string &defaultValue, const Callback &callback, bool requiresRestart = false); + void add(const std::string &unlocalizedCategory, const std::string &unlocalizedName, const std::vector &defaultValue, const Callback &callback, bool requiresRestart = false); - void addCategoryDescrition(const std::string &unlocalizedCategory, const std::string &unlocalizedCategoryDescription); + void addCategoryDescription(const std::string &unlocalizedCategory, const std::string &unlocalizedCategoryDescription); void write(const std::string &unlocalizedCategory, const std::string &unlocalizedName, i64 value); void write(const std::string &unlocalizedCategory, const std::string &unlocalizedName, const std::string &value); @@ -80,7 +81,6 @@ namespace hex { std::map &getCategoryDescriptions(); nlohmann::json getSetting(const std::string &unlocalizedCategory, const std::string &unlocalizedName); nlohmann::json &getSettingsData(); - std::vector getStringArray(const std::string &unlocalizedCategory, const std::string &unlocalizedName); } /* Command Palette Command Registry. Allows adding of new commands to the command palette */ diff --git a/lib/libimhex/include/hex/helpers/utils.hpp b/lib/libimhex/include/hex/helpers/utils.hpp index 001a232f3..8b40f4b6f 100644 --- a/lib/libimhex/include/hex/helpers/utils.hpp +++ b/lib/libimhex/include/hex/helpers/utils.hpp @@ -258,7 +258,7 @@ namespace hex { Folder }; - void openFileBrowser(const std::string &title, DialogMode mode, const std::vector &validExtensions, const std::function &callback, const std::string &defaultPath = {}); + bool openFileBrowser(const std::string &title, DialogMode mode, const std::vector &validExtensions, const std::function &callback, const std::string &defaultPath = {}); float float16ToFloat32(u16 float16); diff --git a/lib/libimhex/include/hex/ui/view.hpp b/lib/libimhex/include/hex/ui/view.hpp index d4baabcbc..a3cc67821 100644 --- a/lib/libimhex/include/hex/ui/view.hpp +++ b/lib/libimhex/include/hex/ui/view.hpp @@ -38,6 +38,7 @@ namespace hex { static void showMessagePopup(const std::string &message); static void showErrorPopup(const std::string &errorMessage); static void showFatalPopup(const std::string &errorMessage); + static void showYesNoQuestionPopup(const std::string &message, const std::function &yesCallback, const std::function &noCallback); static void showFileChooserPopup(const std::vector &paths, const std::vector &validExtensions, const std::function &callback); @@ -71,6 +72,8 @@ namespace hex { static std::string s_popupMessage; + static std::function s_yesCallback, s_noCallback; + static u32 s_selectableFileIndex; static std::vector s_selectableFiles; static std::function s_selectableFileOpenCallback; diff --git a/lib/libimhex/source/api/content_registry.cpp b/lib/libimhex/source/api/content_registry.cpp index 75aee8712..179610802 100644 --- a/lib/libimhex/source/api/content_registry.cpp +++ b/lib/libimhex/source/api/content_registry.cpp @@ -54,10 +54,10 @@ namespace hex { return found; } - void add(const std::string &unlocalizedCategory, const std::string &unlocalizedName, i64 defaultValue, const Callback &callback) { + void add(const std::string &unlocalizedCategory, const std::string &unlocalizedName, i64 defaultValue, const Callback &callback, bool requiresRestart) { log::info("Registered new integer setting: [{}]: {}", unlocalizedCategory, unlocalizedName); - getCategoryEntry(unlocalizedCategory)->second.emplace_back(Entry { unlocalizedName.c_str(), callback }); + getCategoryEntry(unlocalizedCategory)->second.emplace_back(Entry { unlocalizedName.c_str(), requiresRestart, callback }); auto &json = getSettingsData(); @@ -67,10 +67,10 @@ namespace hex { json[unlocalizedCategory][unlocalizedName] = int(defaultValue); } - void add(const std::string &unlocalizedCategory, const std::string &unlocalizedName, const std::string &defaultValue, const Callback &callback) { + void add(const std::string &unlocalizedCategory, const std::string &unlocalizedName, const std::string &defaultValue, const Callback &callback, bool requiresRestart) { log::info("Registered new string setting: [{}]: {}", unlocalizedCategory, unlocalizedName); - getCategoryEntry(unlocalizedCategory)->second.emplace_back(Entry { unlocalizedName, callback }); + getCategoryEntry(unlocalizedCategory)->second.emplace_back(Entry { unlocalizedName, requiresRestart, callback }); auto &json = getSettingsData(); @@ -80,10 +80,10 @@ namespace hex { json[unlocalizedCategory][unlocalizedName] = std::string(defaultValue); } - void add(const std::string &unlocalizedCategory, const std::string &unlocalizedName, const std::vector &defaultValue, const Callback &callback) { + void add(const std::string &unlocalizedCategory, const std::string &unlocalizedName, const std::vector &defaultValue, const Callback &callback, bool requiresRestart) { log::info("Registered new string array setting: [{}]: {}", unlocalizedCategory, unlocalizedName); - getCategoryEntry(unlocalizedCategory)->second.emplace_back(Entry { unlocalizedName, callback }); + getCategoryEntry(unlocalizedCategory)->second.emplace_back(Entry { unlocalizedName, requiresRestart, callback }); auto &json = getSettingsData(); @@ -93,7 +93,7 @@ namespace hex { json[unlocalizedCategory][unlocalizedName] = defaultValue; } - void addCategoryDescrition(const std::string &unlocalizedCategory, const std::string &unlocalizedCategoryDescription) { + void addCategoryDescription(const std::string &unlocalizedCategory, const std::string &unlocalizedCategoryDescription) { getCategoryDescriptions()[unlocalizedCategory] = unlocalizedCategoryDescription; } @@ -198,15 +198,6 @@ namespace hex { return settings; } - std::vector getStringArray(const std::string &unlocalizedCategory, const std::string &unlocalizedName) { - auto setting = getSetting(unlocalizedCategory, unlocalizedName); - if (setting.is_array()) { - return setting; - } - - return {}; - } - } diff --git a/lib/libimhex/source/helpers/paths.cpp b/lib/libimhex/source/helpers/paths.cpp index 71b38f010..2b84b703d 100644 --- a/lib/libimhex/source/helpers/paths.cpp +++ b/lib/libimhex/source/helpers/paths.cpp @@ -38,7 +38,7 @@ namespace hex { std::vector result; const auto exePath = getExecutablePath(); const std::string settingName { "hex.builtin.setting.folders" }; - auto userDirs = ContentRegistry::Settings::getStringArray(settingName, settingName); + auto userDirs = ContentRegistry::Settings::read(settingName, settingName, std::vector {}); auto addUserDirs = [&userDirs](auto &paths) { std::transform(userDirs.begin(), userDirs.end(), std::back_inserter(paths), [](auto &item) { diff --git a/lib/libimhex/source/helpers/utils.cpp b/lib/libimhex/source/helpers/utils.cpp index c940f08a6..fbf2b1435 100644 --- a/lib/libimhex/source/helpers/utils.cpp +++ b/lib/libimhex/source/helpers/utils.cpp @@ -394,7 +394,7 @@ namespace hex { } - void openFileBrowser(const std::string &title, DialogMode mode, const std::vector &validExtensions, const std::function &callback, const std::string &defaultPath) { + bool openFileBrowser(const std::string &title, DialogMode mode, const std::vector &validExtensions, const std::function &callback, const std::string &defaultPath) { NFD::Init(); nfdchar_t *outPath; @@ -419,6 +419,8 @@ namespace hex { } NFD::Quit(); + + return result == NFD_OKAY; } float float16ToFloat32(u16 float16) { diff --git a/lib/libimhex/source/ui/imgui_imhex_extensions.cpp b/lib/libimhex/source/ui/imgui_imhex_extensions.cpp index b7e662362..bfdc85e21 100644 --- a/lib/libimhex/source/ui/imgui_imhex_extensions.cpp +++ b/lib/libimhex/source/ui/imgui_imhex_extensions.cpp @@ -18,7 +18,7 @@ namespace ImGui { int UpdateStringSizeCallback(ImGuiInputTextCallbackData *data) { auto &mathInput = *static_cast(data->UserData); - mathInput.resize(data->BufTextLen); + mathInput.resize(data->BufTextLen + 1); return 0; } diff --git a/lib/libimhex/source/ui/view.cpp b/lib/libimhex/source/ui/view.cpp index c9152e9fe..849046525 100644 --- a/lib/libimhex/source/ui/view.cpp +++ b/lib/libimhex/source/ui/view.cpp @@ -10,6 +10,8 @@ namespace hex { std::string View::s_popupMessage; + std::function View::s_yesCallback, View::s_noCallback; + u32 View::s_selectableFileIndex; std::vector View::s_selectableFiles; std::function View::s_selectableFileOpenCallback; @@ -65,6 +67,23 @@ namespace hex { ImGui::EndPopup(); } + ImGui::SetNextWindowSizeConstraints(scaled(ImVec2(400, 100)), scaled(ImVec2(600, 300))); + if (ImGui::BeginPopupModal("hex.builtin.common.question"_lang, nullptr, ImGuiWindowFlags_AlwaysAutoResize)) { + ImGui::TextFormattedWrapped("{}", s_popupMessage.c_str()); + ImGui::NewLine(); + ImGui::Separator(); + + View::confirmButtons( + "hex.builtin.common.yes"_lang, "hex.builtin.common.no"_lang, [] { + s_yesCallback(); + ImGui::CloseCurrentPopup(); }, [] { + s_noCallback(); + ImGui::CloseCurrentPopup(); }); + + ImGui::SetWindowPos((windowSize - ImGui::GetWindowSize()) / 2, ImGuiCond_Appearing); + ImGui::EndPopup(); + } + bool opened = true; ImGui::SetNextWindowPos(ImGui::GetMainViewport()->GetCenter(), ImGuiCond_Appearing, ImVec2(0.5F, 0.5F)); if (ImGui::BeginPopupModal("hex.builtin.common.choose_file"_lang, &opened, ImGuiWindowFlags_AlwaysAutoResize)) { @@ -117,6 +136,15 @@ namespace hex { ImHexApi::Tasks::doLater([] { ImGui::OpenPopup("hex.builtin.common.fatal"_lang); }); } + void View::showYesNoQuestionPopup(const std::string &message, const std::function &yesCallback, const std::function &noCallback) { + s_popupMessage = message; + + s_yesCallback = yesCallback; + s_noCallback = noCallback; + + ImHexApi::Tasks::doLater([] { ImGui::OpenPopup("hex.builtin.common.question"_lang); }); + } + void View::showFileChooserPopup(const std::vector &paths, const std::vector &validExtensions, const std::function &callback) { if (paths.empty()) { hex::openFileBrowser("hex.builtin.common.open"_lang, DialogMode::Open, validExtensions, [callback](const auto &path) { diff --git a/main/source/init/tasks.cpp b/main/source/init/tasks.cpp index f69dbfe18..55fe36908 100644 --- a/main/source/init/tasks.cpp +++ b/main/source/init/tasks.cpp @@ -92,14 +92,18 @@ namespace hex::init { auto fonts = IM_NEW(ImFontAtlas)(); ImFontConfig cfg = {}; - fs::path fontFile; - for (const auto &dir : hex::getPath(ImHexPath::Resources)) { - auto path = dir / "font.ttf"; - if (fs::exists(path)) { - log::info("Loading custom front from {}", path.string()); + fs::path fontFile = ContentRegistry::Settings::read("hex.builtin.setting.font", "hex.builtin.setting.font.font_path", ""); - fontFile = path; - break; + // If no custom font has been specified, search for a file called "font.ttf" in one of the resource folders + if (fontFile.empty()) { + for (const auto &dir : hex::getPath(ImHexPath::Resources)) { + auto path = dir / "font.ttf"; + if (fs::exists(path)) { + log::info("Loading custom front from {}", path.string()); + + fontFile = path; + break; + } } } @@ -130,7 +134,7 @@ namespace hex::init { float fontSize = 13.0F * ImHexApi::System::getGlobalScale(); if (fontFile.empty()) { - // Load default font + // Load default font if no custom one has been specified fonts->Clear(); @@ -140,7 +144,7 @@ namespace hex::init { } else { // Load custom font - fontSize = ContentRegistry::Settings::read("hex.builtin.setting.interface", "hex.builtin.setting.interface.font_size", 14) * ImHexApi::System::getGlobalScale(); + fontSize = ContentRegistry::Settings::read("hex.builtin.setting.font", "hex.builtin.setting.font.font_size", 13) * ImHexApi::System::getGlobalScale(); cfg.OversampleH = cfg.OversampleV = 1, cfg.PixelSnapH = true; cfg.SizePixels = fontSize; diff --git a/plugins/builtin/include/content/views/view_settings.hpp b/plugins/builtin/include/content/views/view_settings.hpp index 71a20d205..3300f444c 100644 --- a/plugins/builtin/include/content/views/view_settings.hpp +++ b/plugins/builtin/include/content/views/view_settings.hpp @@ -19,6 +19,9 @@ namespace hex::plugin::builtin { [[nodiscard]] ImVec2 getMinSize() const override { return { 500, 300 }; } [[nodiscard]] ImVec2 getMaxSize() const override { return { 500, 300 }; } + + private: + bool m_restartRequested = false; }; } \ No newline at end of file diff --git a/plugins/builtin/source/content/settings_entries.cpp b/plugins/builtin/source/content/settings_entries.cpp index 515dd4878..617859ed4 100644 --- a/plugins/builtin/source/content/settings_entries.cpp +++ b/plugins/builtin/source/content/settings_entries.cpp @@ -57,27 +57,29 @@ namespace hex::plugin::builtin { return false; }); - ContentRegistry::Settings::add("hex.builtin.setting.interface", "hex.builtin.setting.interface.scaling", 0, [](auto name, nlohmann::json &setting) { - static int selection = static_cast(setting); + ContentRegistry::Settings::add( + "hex.builtin.setting.interface", "hex.builtin.setting.interface.scaling", 0, [](auto name, nlohmann::json &setting) { + static int selection = static_cast(setting); - const char *scaling[] = { - "hex.builtin.setting.interface.scaling.native"_lang, - "hex.builtin.setting.interface.scaling.x0_5"_lang, - "hex.builtin.setting.interface.scaling.x1_0"_lang, - "hex.builtin.setting.interface.scaling.x1_5"_lang, - "hex.builtin.setting.interface.scaling.x2_0"_lang, - }; + const char *scaling[] = { + "hex.builtin.setting.interface.scaling.native"_lang, + "hex.builtin.setting.interface.scaling.x0_5"_lang, + "hex.builtin.setting.interface.scaling.x1_0"_lang, + "hex.builtin.setting.interface.scaling.x1_5"_lang, + "hex.builtin.setting.interface.scaling.x2_0"_lang, + }; - if (ImGui::Combo(name.data(), &selection, scaling, IM_ARRAYSIZE(scaling))) { - setting = selection; + if (ImGui::Combo(name.data(), &selection, scaling, IM_ARRAYSIZE(scaling))) { + setting = selection; - ImHexApi::Common::restartImHex(); + ImHexApi::Common::restartImHex(); - return true; - } + return true; + } - return false; - }); + return false; + }, + true); ContentRegistry::Settings::add("hex.builtin.setting.interface", "hex.builtin.setting.interface.language", "en-US", [](auto name, nlohmann::json &setting) { auto &languages = LangEntry::getSupportedLanguages(); @@ -222,9 +224,58 @@ namespace hex::plugin::builtin { return false; }); + + static std::string fontPath; + ContentRegistry::Settings::add( + "hex.builtin.setting.font", "hex.builtin.setting.font.font_path", "", [](auto name, nlohmann::json &setting) { + fontPath = static_cast(setting); + + if (ImGui::InputText("##font_path", fontPath.data(), fontPath.capacity(), ImGuiInputTextFlags_CallbackResize, ImGui::UpdateStringSizeCallback, &fontPath)) { + setting = fontPath; + return true; + } + + ImGui::SameLine(); + + if (ImGui::IconButton(ICON_VS_FOLDER_OPENED, ImGui::GetStyleColorVec4(ImGuiCol_Text))) { + return hex::openFileBrowser("hex.builtin.setting.font.font_path", DialogMode::Open, { + {"TTF Font", "ttf"} + }, + [&](const fs::path &path) { + fontPath = path.string(); + setting = fontPath; + }); + } + + ImGui::SameLine(); + + ImGui::TextFormatted("{}", name); + + return false; + }, + true); + + ContentRegistry::Settings::add( + "hex.builtin.setting.font", "hex.builtin.setting.font.font_size", 13, [](auto name, nlohmann::json &setting) { + static int fontSize = static_cast(setting); + + ImGui::BeginDisabled(fontPath.empty()); + + if (ImGui::SliderInt(name.data(), &fontSize, 0, 100, "%d", ImGuiSliderFlags_NoInput)) { + setting = fontSize; + return true; + } + + ImGui::EndDisabled(); + + return false; + }, + true); + + static const std::string dirsSetting { "hex.builtin.setting.folders" }; - ContentRegistry::Settings::addCategoryDescrition(dirsSetting, "hex.builtin.setting.folders.description"); + ContentRegistry::Settings::addCategoryDescription(dirsSetting, "hex.builtin.setting.folders.description"); ContentRegistry::Settings::add(dirsSetting, dirsSetting, std::vector {}, [](auto name, nlohmann::json &setting) { static std::vector folders = setting; diff --git a/plugins/builtin/source/content/views/view_settings.cpp b/plugins/builtin/source/content/views/view_settings.cpp index 35b64d4c5..3a3108ea2 100644 --- a/plugins/builtin/source/content/views/view_settings.cpp +++ b/plugins/builtin/source/content/views/view_settings.cpp @@ -2,6 +2,8 @@ #include +#include + #include namespace hex::plugin::builtin { @@ -45,15 +47,20 @@ namespace hex::plugin::builtin { const auto &descriptions = ContentRegistry::Settings::getCategoryDescriptions(); for (auto &it : sortedCategories) { - auto &[category, entries] = *it; + auto &[category, settings] = *it; if (ImGui::BeginTabItem(LangEntry(category))) { const std::string &categoryDesc = descriptions.count(category) ? descriptions.at(category) : category.name; ImGui::TextUnformatted(LangEntry(categoryDesc)); ImGui::Separator(); - for (auto &[name, callback] : entries) { - if (callback(LangEntry(name), ContentRegistry::Settings::getSettingsData()[category.name][name])) + for (auto &[name, requiresRestart, callback] : settings) { + if (callback(LangEntry(name), ContentRegistry::Settings::getSettingsData()[category.name][name])) { + log::info("Setting [{}]: {} was changed", category.name, name); EventManager::post(); + + if (requiresRestart) + this->m_restartRequested = true; + } } ImGui::EndTabItem(); @@ -65,6 +72,10 @@ namespace hex::plugin::builtin { ImGui::EndPopup(); } else this->getWindowOpenState() = false; + + if (this->getWindowOpenState() == false && this->m_restartRequested) { + View::showYesNoQuestionPopup("hex.builtin.view.settings.restart_question"_lang, ImHexApi::Common::restartImHex, [] {}); + } } } diff --git a/plugins/builtin/source/lang/de_DE.cpp b/plugins/builtin/source/lang/de_DE.cpp index 6898d5a3d..db53ed8c2 100644 --- a/plugins/builtin/source/lang/de_DE.cpp +++ b/plugins/builtin/source/lang/de_DE.cpp @@ -59,6 +59,7 @@ namespace hex::plugin::builtin { { "hex.builtin.common.info", "Information" }, { "hex.builtin.common.error", "Fehler" }, { "hex.builtin.common.fatal", "Fataler Fehler" }, + { "hex.builtin.common.question", "Frage" }, { "hex.builtin.common.address", "Adresse" }, { "hex.builtin.common.size", "Länge" }, { "hex.builtin.common.region", "Region" }, @@ -330,6 +331,7 @@ namespace hex::plugin::builtin { { "hex.builtin.view.pattern_data.value", "Wert" }, { "hex.builtin.view.settings.name", "Einstellungen" }, + { "hex.builtin.view.settings.restart_question", "Eine Änderung die du gemacht hast benötigt einen neustart von ImHex. Möchtest du ImHex jetzt neu starten?" }, { "hex.builtin.view.strings.name", "Strings" }, { "hex.builtin.view.strings.copy", "String kopieren" }, @@ -672,6 +674,11 @@ namespace hex::plugin::builtin { { "hex.builtin.setting.hex_editor.grey_zeros", "Nullen ausgrauen" }, { "hex.builtin.setting.hex_editor.uppercase_hex", "Hex Zeichen als Grossbuchstaben" }, { "hex.builtin.setting.hex_editor.extra_info", "Extra informationen anzeigen" }, + { "hex.builtin.setting.folders", "Ordner" }, + { "hex.builtin.setting.folders.description", "Gib zusätzliche Orderpfade an in welchen Pattern, Scripts, Yara Rules und anderes gesucht wird" }, + { "hex.builtin.setting.font", "Schriftart" }, + { "hex.builtin.setting.font.font_path", "Eigene Schriftart" }, + { "hex.builtin.setting.font.font_size", "Schriftgrösse" }, { "hex.builtin.provider.file.path", "Dateipfad" }, { "hex.builtin.provider.file.size", "Größe" }, diff --git a/plugins/builtin/source/lang/en_US.cpp b/plugins/builtin/source/lang/en_US.cpp index 3e0acdafd..3fe1c2793 100644 --- a/plugins/builtin/source/lang/en_US.cpp +++ b/plugins/builtin/source/lang/en_US.cpp @@ -60,6 +60,7 @@ namespace hex::plugin::builtin { { "hex.builtin.common.info", "Information" }, { "hex.builtin.common.error", "Error" }, { "hex.builtin.common.fatal", "Fatal Error" }, + { "hex.builtin.common.question", "Question" }, { "hex.builtin.common.address", "Address" }, { "hex.builtin.common.size", "Size" }, { "hex.builtin.common.region", "Region" }, @@ -334,6 +335,7 @@ namespace hex::plugin::builtin { { "hex.builtin.view.pattern_data.value", "Value" }, { "hex.builtin.view.settings.name", "Settings" }, + { "hex.builtin.view.settings.restart_question", "A change you made requires a restart of ImHex to take effect. Would you like to restart it now?" }, { "hex.builtin.view.strings.name", "Strings" }, { "hex.builtin.view.strings.copy", "Copy string" }, @@ -677,7 +679,10 @@ namespace hex::plugin::builtin { { "hex.builtin.setting.hex_editor.uppercase_hex", "Upper case Hex characters" }, { "hex.builtin.setting.hex_editor.extra_info", "Display extra information" }, { "hex.builtin.setting.folders", "Folders" }, - { "hex.builtin.setting.folders.description", "Specify additional search paths for patterns, scripts, rules and more" }, + { "hex.builtin.setting.folders.description", "Specify additional search paths for patterns, scripts, Yara rules and more" }, + { "hex.builtin.setting.font", "Font" }, + { "hex.builtin.setting.font.font_path", "Custom Font Path" }, + { "hex.builtin.setting.font.font_size", "Font Size" }, { "hex.builtin.provider.file.path", "File path" }, { "hex.builtin.provider.file.size", "Size" }, diff --git a/plugins/builtin/source/lang/it_IT.cpp b/plugins/builtin/source/lang/it_IT.cpp index 9472886e5..7fe81a99d 100644 --- a/plugins/builtin/source/lang/it_IT.cpp +++ b/plugins/builtin/source/lang/it_IT.cpp @@ -58,6 +58,7 @@ namespace hex::plugin::builtin { { "hex.builtin.common.info", "Informazioni" }, { "hex.builtin.common.error", "Errore" }, { "hex.builtin.common.fatal", "Errore Fatale" }, + //{ "hex.builtin.common.question", "Question" }, { "hex.builtin.common.address", "Indirizzo" }, { "hex.builtin.common.size", "Dimensione" }, { "hex.builtin.common.region", "Regione" }, @@ -329,6 +330,7 @@ namespace hex::plugin::builtin { { "hex.builtin.view.pattern_data.value", "Valore" }, { "hex.builtin.view.settings.name", "Impostazioni" }, + //{ "hex.builtin.view.settings.restart_question", "A change you made requires a restart of ImHex to take effect. Would you like to restart it now?" }, { "hex.builtin.view.strings.name", "Stringhe" }, { "hex.builtin.view.strings.copy", "Copia stringa" }, @@ -673,6 +675,11 @@ namespace hex::plugin::builtin { { "hex.builtin.setting.hex_editor.grey_zeros", "Taglia fuori gli zeri" }, { "hex.builtin.setting.hex_editor.uppercase_hex", "Caratteri esadecimali maiuscoli" }, { "hex.builtin.setting.hex_editor.extra_info", "Mostra informazioni extra" }, + //{ "hex.builtin.setting.folders", "Folders" }, + //{ "hex.builtin.setting.folders.description", "Specify additional search paths for patterns, scripts, rules and more" }, + //{ "hex.builtin.setting.font", "Font" }, + //{ "hex.builtin.setting.font.font_path", "Custom Font Path" }, + //{ "hex.builtin.setting.font.font_size", "Font Size" }, { "hex.builtin.provider.file.path", "Percorso del File" }, { "hex.builtin.provider.file.size", "Dimensione" }, diff --git a/plugins/builtin/source/lang/ja_JP.cpp b/plugins/builtin/source/lang/ja_JP.cpp index dcf675711..647cf1703 100644 --- a/plugins/builtin/source/lang/ja_JP.cpp +++ b/plugins/builtin/source/lang/ja_JP.cpp @@ -59,6 +59,7 @@ namespace hex::plugin::builtin { { "hex.builtin.common.info", "情報" }, { "hex.builtin.common.error", "エラー" }, { "hex.builtin.common.fatal", "深刻なエラー" }, + //{ "hex.builtin.common.question", "Question" }, { "hex.builtin.common.address", "アドレス" }, { "hex.builtin.common.size", "サイズ" }, { "hex.builtin.common.region", "住所" }, @@ -333,6 +334,7 @@ namespace hex::plugin::builtin { { "hex.builtin.view.pattern_data.value", "値" }, { "hex.builtin.view.settings.name", "設定" }, + //{ "hex.builtin.view.settings.restart_question", "A change you made requires a restart of ImHex to take effect. Would you like to restart it now?" }, { "hex.builtin.view.strings.name", "文字列" }, { "hex.builtin.view.strings.copy", "文字列をコピー" }, @@ -674,6 +676,11 @@ namespace hex::plugin::builtin { { "hex.builtin.setting.hex_editor.grey_zeros", "ゼロをグレーアウト" }, { "hex.builtin.setting.hex_editor.uppercase_hex", "16進数を大文字表記" }, { "hex.builtin.setting.hex_editor.extra_info", "追加情報を表示" }, + //{ "hex.builtin.setting.folders", "Folders" }, + //{ "hex.builtin.setting.folders.description", "Specify additional search paths for patterns, scripts, rules and more" }, + //{ "hex.builtin.setting.font", "Font" }, + //{ "hex.builtin.setting.font.font_path", "Custom Font Path" }, + //{ "hex.builtin.setting.font.font_size", "Font Size" }, { "hex.builtin.provider.file.path", "ファイルパス" }, { "hex.builtin.provider.file.size", "サイズ" }, diff --git a/plugins/builtin/source/lang/zh_CN.cpp b/plugins/builtin/source/lang/zh_CN.cpp index f42f957b2..d2844ffd4 100644 --- a/plugins/builtin/source/lang/zh_CN.cpp +++ b/plugins/builtin/source/lang/zh_CN.cpp @@ -59,6 +59,7 @@ namespace hex::plugin::builtin { { "hex.builtin.common.info", "信息" }, { "hex.builtin.common.error", "错误" }, { "hex.builtin.common.fatal", "致命错误" }, + // { "hex.builtin.common.question", "Question" }, { "hex.builtin.common.address", "地址" }, { "hex.builtin.common.size", "大小" }, { "hex.builtin.common.region", "区域" }, @@ -329,6 +330,7 @@ namespace hex::plugin::builtin { { "hex.builtin.view.pattern_data.value", "值" }, { "hex.builtin.view.settings.name", "设置" }, + //{ "hex.builtin.view.settings.restart_question", "A change you made requires a restart of ImHex to take effect. Would you like to restart it now?" }, { "hex.builtin.view.strings.name", "字符串" }, { "hex.builtin.view.strings.copy", "复制字符串" }, @@ -668,6 +670,11 @@ namespace hex::plugin::builtin { { "hex.builtin.setting.hex_editor.grey_zeros", "显示零字节为灰色" }, { "hex.builtin.setting.hex_editor.uppercase_hex", "大写Hex字符" }, { "hex.builtin.setting.hex_editor.extra_info", "显示额外信息" }, + //{ "hex.builtin.setting.folders", "Folders" }, + //{ "hex.builtin.setting.folders.description", "Specify additional search paths for patterns, scripts, rules and more" }, + //{ "hex.builtin.setting.font", "Font" }, + //{ "hex.builtin.setting.font.font_path", "Custom Font Path" }, + //{ "hex.builtin.setting.font.font_size", "Font Size" }, { "hex.builtin.provider.file.path", "路径" }, { "hex.builtin.provider.file.size", "大小" },