impr: Added tooltip informing about font size if no custom font was selected

This commit is contained in:
WerWolv
2023-03-22 16:30:49 +01:00
parent 45649264f9
commit 631cfce2f8
2 changed files with 8 additions and 0 deletions

View File

@@ -405,6 +405,7 @@
"hex.builtin.setting.font": "Font",
"hex.builtin.setting.font.font_path": "Custom Font Path",
"hex.builtin.setting.font.font_size": "Font Size",
"hex.builtin.setting.font.font_size.tooltip": "The font size can only be adjusted when a custom font has been selected above.\n\nThis is because ImHex uses a pixel-perfect bitmap font by default. Scaling it by any non-integer factor will only cause it to become blurry.",
"hex.builtin.setting.general": "General",
"hex.builtin.setting.general.auto_load_patterns": "Auto-load supported pattern",
"hex.builtin.setting.general.check_for_updates": "Check for updates on startup",

View File

@@ -438,6 +438,13 @@ namespace hex::plugin::builtin {
return true;
}
if (fontPath.empty() && ImGui::IsItemHovered(ImGuiHoveredFlags_AllowWhenDisabled)) {
ImGui::SetNextWindowSize(scaled(ImVec2(300, 0)));
ImGui::BeginTooltip();
ImGui::TextFormattedWrapped("{}", "hex.builtin.setting.font.font_size.tooltip"_lang);
ImGui::EndTooltip();
}
return false;
},
true);