mirror of https://github.com/WerWolv/ImHex.git
ux: Add a setting to disable loading of unicode characters (#798)
* Add setting to disable loading of unicode characters * change message * set message in other langs * fix formatting
This commit is contained in:
parent
d3b6c2d0e6
commit
e76d5854b8
|
@ -142,7 +142,10 @@ namespace hex::init {
|
|||
|
||||
fonts->AddFontFromMemoryCompressedTTF(font_awesome_compressed_data, font_awesome_compressed_size, fontSize, &cfg, fontAwesomeRange);
|
||||
fonts->AddFontFromMemoryCompressedTTF(codicons_compressed_data, codicons_compressed_size, fontSize, &cfg, codiconsRange);
|
||||
fonts->AddFontFromMemoryCompressedTTF(unifont_compressed_data, unifont_compressed_size, fontSize, &cfg, unifontRange);
|
||||
|
||||
bool enableUnicode = ContentRegistry::Settings::read("hex.builtin.setting.general", "hex.builtin.setting.general.enable_unicode", true);
|
||||
if (enableUnicode)
|
||||
fonts->AddFontFromMemoryCompressedTTF(unifont_compressed_data, unifont_compressed_size, fontSize, &cfg, unifontRange);
|
||||
|
||||
fonts->Build();
|
||||
|
||||
|
|
|
@ -68,6 +68,17 @@ namespace hex::plugin::builtin {
|
|||
return false;
|
||||
});
|
||||
|
||||
ContentRegistry::Settings::add("hex.builtin.setting.general", "hex.builtin.setting.general.enable_unicode", 1, [](auto name, nlohmann::json &setting) {
|
||||
static bool enabled = static_cast<int>(setting);
|
||||
|
||||
if (ImGui::Checkbox(name.data(), &enabled)) {
|
||||
setting = static_cast<int>(enabled);
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
/* Interface */
|
||||
|
||||
ContentRegistry::Settings::add("hex.builtin.setting.interface", "hex.builtin.setting.interface.color", 0, [](auto name, nlohmann::json &setting) {
|
||||
|
|
|
@ -780,6 +780,7 @@ namespace hex::plugin::builtin {
|
|||
{ "hex.builtin.setting.general.show_tips", "Tipps beim start anzeigen" },
|
||||
{ "hex.builtin.setting.general.auto_load_patterns", "Automatisches Pattern laden" },
|
||||
{ "hex.builtin.setting.general.sync_pattern_source", "Pattern Source Code zwischen Providern synchronisieren" },
|
||||
// { "hex.builtin.setting.general.enable_unicode", "Load all unicode characters" },
|
||||
{ "hex.builtin.setting.interface", "Aussehen" },
|
||||
{ "hex.builtin.setting.interface.color", "Farbthema" },
|
||||
{ "hex.builtin.setting.interface.color.system", "System" },
|
||||
|
|
|
@ -785,6 +785,7 @@ namespace hex::plugin::builtin {
|
|||
{ "hex.builtin.setting.general.show_tips", "Show tips on startup" },
|
||||
{ "hex.builtin.setting.general.auto_load_patterns", "Auto-load supported pattern" },
|
||||
{ "hex.builtin.setting.general.sync_pattern_source", "Sync pattern source code between providers" },
|
||||
{ "hex.builtin.setting.general.enable_unicode", "Load all unicode characters" },
|
||||
{ "hex.builtin.setting.interface", "Interface" },
|
||||
{ "hex.builtin.setting.interface.color", "Color theme" },
|
||||
{ "hex.builtin.setting.interface.color.system", "System" },
|
||||
|
|
|
@ -789,6 +789,7 @@ namespace hex::plugin::builtin {
|
|||
{ "hex.builtin.setting.general.show_tips", "Mostra consigli all'avvio" },
|
||||
{ "hex.builtin.setting.general.auto_load_patterns", "Auto-caricamento del pattern supportato" },
|
||||
// { "hex.builtin.setting.general.sync_pattern_source", "Sync pattern source code between providers" },
|
||||
// { "hex.builtin.setting.general.enable_unicode", "Load all unicode characters" },
|
||||
{ "hex.builtin.setting.interface", "Interfaccia" },
|
||||
{ "hex.builtin.setting.interface.color", "Colore del Tema" },
|
||||
{ "hex.builtin.setting.interface.color.system", "Sistema" },
|
||||
|
|
|
@ -787,6 +787,7 @@ namespace hex::plugin::builtin {
|
|||
{ "hex.builtin.setting.general.show_tips", "起動時に豆知識を表示" },
|
||||
{ "hex.builtin.setting.general.auto_load_patterns", "対応するパターンを自動で読み込む" },
|
||||
{ "hex.builtin.setting.general.sync_pattern_source", "プロバイダ間のパターンソースコードを同期" },
|
||||
// { "hex.builtin.setting.general.enable_unicode", "Load all unicode characters" },
|
||||
{ "hex.builtin.setting.interface", "UI" },
|
||||
{ "hex.builtin.setting.interface.color", "カラーテーマ" },
|
||||
{ "hex.builtin.setting.interface.color.system", "システム設定に従う" },
|
||||
|
|
|
@ -784,6 +784,7 @@ namespace hex::plugin::builtin {
|
|||
{ "hex.builtin.setting.general.show_tips", "시작 시 팁 표시" },
|
||||
{ "hex.builtin.setting.general.auto_load_patterns", "지원하는 패턴 자동으로 로드" },
|
||||
{ "hex.builtin.setting.general.sync_pattern_source", "공급자 간 패턴 소스 코드 동기화" },
|
||||
// { "hex.builtin.setting.general.enable_unicode", "Load all unicode characters" },
|
||||
{ "hex.builtin.setting.interface", "인터페이스" },
|
||||
{ "hex.builtin.setting.interface.color", "색상 테마" },
|
||||
{ "hex.builtin.setting.interface.color.system", "시스템" },
|
||||
|
|
|
@ -783,6 +783,7 @@ namespace hex::plugin::builtin {
|
|||
{ "hex.builtin.setting.general.show_tips", "Mostrar dicas na inicialização" },
|
||||
{ "hex.builtin.setting.general.auto_load_patterns", "Padrão compatível com carregamento automático" },
|
||||
// { "hex.builtin.setting.general.sync_pattern_source", "Sync pattern source code between providers" },
|
||||
// { "hex.builtin.setting.general.enable_unicode", "Load all unicode characters" },
|
||||
{ "hex.builtin.setting.interface", "Interface" },
|
||||
{ "hex.builtin.setting.interface.color", "Color theme" },
|
||||
{ "hex.builtin.setting.interface.color.system", "Sistema" },
|
||||
|
|
|
@ -785,6 +785,7 @@ namespace hex::plugin::builtin {
|
|||
{ "hex.builtin.setting.general.show_tips", "在启动时显示每日提示" },
|
||||
{ "hex.builtin.setting.general.auto_load_patterns", "自动加载支持的模式" },
|
||||
{ "hex.builtin.setting.general.sync_pattern_source", "在提供器间同步模式源码" },
|
||||
// { "hex.builtin.setting.general.enable_unicode", "Load all unicode characters" },
|
||||
{ "hex.builtin.setting.interface", "界面" },
|
||||
{ "hex.builtin.setting.interface.color", "颜色主题" },
|
||||
{ "hex.builtin.setting.interface.color.system", "跟随系统" },
|
||||
|
|
|
@ -783,6 +783,7 @@ namespace hex::plugin::builtin {
|
|||
{ "hex.builtin.setting.general.show_tips", "啟動時顯示提示" },
|
||||
{ "hex.builtin.setting.general.auto_load_patterns", "自動載入支援的模式" },
|
||||
// { "hex.builtin.setting.general.sync_pattern_source", "Sync pattern source code between providers" },
|
||||
// { "hex.builtin.setting.general.enable_unicode", "Load all unicode characters" },
|
||||
{ "hex.builtin.setting.interface", "介面" },
|
||||
{ "hex.builtin.setting.interface.color", "顏色主題" },
|
||||
{ "hex.builtin.setting.interface.color.system", "系統" },
|
||||
|
|
Loading…
Reference in New Issue