1
0
mirror of synced 2024-11-28 01:20:51 +01:00

ux: Added custom font and font size setting to settings menu, improve rebooting behaviour

This commit is contained in:
WerWolv 2022-02-21 21:46:25 +01:00
parent ef8e9a83bb
commit 75bd7805c9
17 changed files with 182 additions and 56 deletions

View File

@ -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<std::string> &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<std::string> &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<std::string, std::string> &getCategoryDescriptions();
nlohmann::json getSetting(const std::string &unlocalizedCategory, const std::string &unlocalizedName);
nlohmann::json &getSettingsData();
std::vector<std::string> getStringArray(const std::string &unlocalizedCategory, const std::string &unlocalizedName);
}
/* Command Palette Command Registry. Allows adding of new commands to the command palette */

View File

@ -258,7 +258,7 @@ namespace hex {
Folder
};
void openFileBrowser(const std::string &title, DialogMode mode, const std::vector<nfdfilteritem_t> &validExtensions, const std::function<void(fs::path)> &callback, const std::string &defaultPath = {});
bool openFileBrowser(const std::string &title, DialogMode mode, const std::vector<nfdfilteritem_t> &validExtensions, const std::function<void(fs::path)> &callback, const std::string &defaultPath = {});
float float16ToFloat32(u16 float16);

View File

@ -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<void()> &yesCallback, const std::function<void()> &noCallback);
static void showFileChooserPopup(const std::vector<fs::path> &paths, const std::vector<nfdfilteritem_t> &validExtensions, const std::function<void(fs::path)> &callback);
@ -71,6 +72,8 @@ namespace hex {
static std::string s_popupMessage;
static std::function<void()> s_yesCallback, s_noCallback;
static u32 s_selectableFileIndex;
static std::vector<fs::path> s_selectableFiles;
static std::function<void(fs::path)> s_selectableFileOpenCallback;

View File

@ -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<std::string> &defaultValue, const Callback &callback) {
void add(const std::string &unlocalizedCategory, const std::string &unlocalizedName, const std::vector<std::string> &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<std::string> getStringArray(const std::string &unlocalizedCategory, const std::string &unlocalizedName) {
auto setting = getSetting(unlocalizedCategory, unlocalizedName);
if (setting.is_array()) {
return setting;
}
return {};
}
}

View File

@ -38,7 +38,7 @@ namespace hex {
std::vector<fs::path> 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<std::string> {});
auto addUserDirs = [&userDirs](auto &paths) {
std::transform(userDirs.begin(), userDirs.end(), std::back_inserter(paths), [](auto &item) {

View File

@ -394,7 +394,7 @@ namespace hex {
}
void openFileBrowser(const std::string &title, DialogMode mode, const std::vector<nfdfilteritem_t> &validExtensions, const std::function<void(fs::path)> &callback, const std::string &defaultPath) {
bool openFileBrowser(const std::string &title, DialogMode mode, const std::vector<nfdfilteritem_t> &validExtensions, const std::function<void(fs::path)> &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) {

View File

@ -18,7 +18,7 @@ namespace ImGui {
int UpdateStringSizeCallback(ImGuiInputTextCallbackData *data) {
auto &mathInput = *static_cast<std::string *>(data->UserData);
mathInput.resize(data->BufTextLen);
mathInput.resize(data->BufTextLen + 1);
return 0;
}

View File

@ -10,6 +10,8 @@ namespace hex {
std::string View::s_popupMessage;
std::function<void()> View::s_yesCallback, View::s_noCallback;
u32 View::s_selectableFileIndex;
std::vector<fs::path> View::s_selectableFiles;
std::function<void(fs::path)> 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<void()> &yesCallback, const std::function<void()> &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<fs::path> &paths, const std::vector<nfdfilteritem_t> &validExtensions, const std::function<void(fs::path)> &callback) {
if (paths.empty()) {
hex::openFileBrowser("hex.builtin.common.open"_lang, DialogMode::Open, validExtensions, [callback](const auto &path) {

View File

@ -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;

View File

@ -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;
};
}

View File

@ -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<int>(setting);
ContentRegistry::Settings::add(
"hex.builtin.setting.interface", "hex.builtin.setting.interface.scaling", 0, [](auto name, nlohmann::json &setting) {
static int selection = static_cast<int>(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<std::string>(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<int>(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<std::string> {}, [](auto name, nlohmann::json &setting) {
static std::vector<std::string> folders = setting;

View File

@ -2,6 +2,8 @@
#include <hex/api/content_registry.hpp>
#include <hex/helpers/logger.hpp>
#include <nlohmann/json.hpp>
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<EventSettingsChanged>();
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, [] {});
}
}
}

View File

@ -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" },

View File

@ -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" },

View File

@ -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" },

View File

@ -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", "サイズ" },

View File

@ -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", "大小" },