ui/patterns: Added settings tooltips, fixed pattern crash (#464)
* fix: pattern segfault typo * ui: added few tooltips into settings Co-authored-by: WerWolv <werwolv98@gmail.com>
This commit is contained in:
parent
f21b22ae15
commit
3da1b3f05d
@ -299,7 +299,7 @@ namespace hex::pl {
|
||||
}
|
||||
|
||||
|
||||
if (auto &arrayEntries = arrayPattern->getEntries(); !entries.empty())
|
||||
if (auto &arrayEntries = arrayPattern->getEntries(); !arrayEntries.empty())
|
||||
arrayPattern->setTypeName(arrayEntries.front()->getTypeName());
|
||||
|
||||
arrayPattern->setEntries(std::move(entries));
|
||||
|
@ -303,6 +303,7 @@ namespace hex::plugin::builtin {
|
||||
}
|
||||
});
|
||||
}
|
||||
ImGui::InfoTooltip("hex.builtin.setting.folders.add_folder"_lang);
|
||||
|
||||
if (ImGui::IconButton(ICON_VS_REMOVE_CLOSE, ImGui::GetCustomColorVec4(ImGuiCustomCol_DescButton), ImVec2(30, 30))) {
|
||||
if (!folders.empty()) {
|
||||
@ -310,6 +311,7 @@ namespace hex::plugin::builtin {
|
||||
ContentRegistry::Settings::write(dirsSetting, dirsSetting, folders);
|
||||
}
|
||||
}
|
||||
ImGui::InfoTooltip("hex.builtin.setting.folders.remove_folder"_lang);
|
||||
|
||||
ImGui::EndGroup();
|
||||
|
||||
|
@ -50,7 +50,9 @@ namespace hex::plugin::builtin {
|
||||
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));
|
||||
LangEntry descriptionEntry{categoryDesc};
|
||||
ImGui::TextUnformatted(descriptionEntry);
|
||||
ImGui::InfoTooltip(descriptionEntry);
|
||||
ImGui::Separator();
|
||||
|
||||
for (auto &[name, requiresRestart, callback] : settings) {
|
||||
|
@ -676,6 +676,8 @@ namespace hex::plugin::builtin {
|
||||
{ "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.folders.add_folder", "Add new folder" },
|
||||
// { "hex.builtin.setting.folders.remove_folder", "Remove currently selected folder from list" },
|
||||
{ "hex.builtin.setting.font", "Schriftart" },
|
||||
{ "hex.builtin.setting.font.font_path", "Eigene Schriftart" },
|
||||
{ "hex.builtin.setting.font.font_size", "Schriftgrösse" },
|
||||
|
@ -680,6 +680,8 @@ namespace hex::plugin::builtin {
|
||||
{ "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, Yara rules and more" },
|
||||
{ "hex.builtin.setting.folders.add_folder", "Add new folder" },
|
||||
{ "hex.builtin.setting.folders.remove_folder", "Remove currently selected folder from list" },
|
||||
{ "hex.builtin.setting.font", "Font" },
|
||||
{ "hex.builtin.setting.font.font_path", "Custom Font Path" },
|
||||
{ "hex.builtin.setting.font.font_size", "Font Size" },
|
||||
|
@ -677,6 +677,8 @@ namespace hex::plugin::builtin {
|
||||
{ "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.folders.add_folder", "Add new folder" },
|
||||
// { "hex.builtin.setting.folders.remove_folder", "Remove currently selected folder from list" },
|
||||
//{ "hex.builtin.setting.font", "Font" },
|
||||
//{ "hex.builtin.setting.font.font_path", "Custom Font Path" },
|
||||
//{ "hex.builtin.setting.font.font_size", "Font Size" },
|
||||
|
@ -678,6 +678,8 @@ namespace hex::plugin::builtin {
|
||||
{ "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.folders.add_folder", "Add new folder" },
|
||||
// { "hex.builtin.setting.folders.remove_folder", "Remove currently selected folder from list" },
|
||||
//{ "hex.builtin.setting.font", "Font" },
|
||||
//{ "hex.builtin.setting.font.font_path", "Custom Font Path" },
|
||||
//{ "hex.builtin.setting.font.font_size", "Font Size" },
|
||||
|
@ -670,8 +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", "扩展搜索路径" },
|
||||
{ "hex.builtin.setting.folders.description", "为模式、脚本和规则等指定额外的搜索路径" },
|
||||
// { "hex.builtin.setting.folders.add_folder", "Add new folder" },
|
||||
// { "hex.builtin.setting.folders.remove_folder", "Remove currently selected folder from list" },
|
||||
{ "hex.builtin.setting.font", "字体" },
|
||||
{ "hex.builtin.setting.font.font_path", "自定义字体路径" },
|
||||
{ "hex.builtin.setting.font.font_size", "字体大小" },
|
||||
|
Loading…
x
Reference in New Issue
Block a user