From 8515cd43fa1fe129987caec272fd1786bb21b3fd Mon Sep 17 00:00:00 2001 From: WerWolv Date: Thu, 28 Aug 2025 17:24:51 +0200 Subject: [PATCH] impr: Added note to Advanced Yara Information section if no matches were found --- plugins/builtin/source/content/views/view_about.cpp | 2 +- plugins/yara_rules/romfs/lang/en_US.json | 3 ++- .../source/content/data_information_sections.cpp | 7 +++++-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/plugins/builtin/source/content/views/view_about.cpp b/plugins/builtin/source/content/views/view_about.cpp index 4d679192d..206024b8c 100644 --- a/plugins/builtin/source/content/views/view_about.cpp +++ b/plugins/builtin/source/content/views/view_about.cpp @@ -494,7 +494,7 @@ namespace hex::plugin::builtin { { "Magic", &paths::Magic }, { "Plugins", &paths::Plugins }, { "Yara Patterns", &paths::Yara }, - { "Yara Advaned Analysis", &paths::YaraAdvancedAnalysis }, + { "Yara Advanced Analysis", &paths::YaraAdvancedAnalysis }, { "Config", &paths::Config }, { "Updates", &paths::Updates }, { "Backups", &paths::Backups }, diff --git a/plugins/yara_rules/romfs/lang/en_US.json b/plugins/yara_rules/romfs/lang/en_US.json index 7896b007d..b59cd6849 100644 --- a/plugins/yara_rules/romfs/lang/en_US.json +++ b/plugins/yara_rules/romfs/lang/en_US.json @@ -1,6 +1,7 @@ { "hex.yara.information_section.advanced_data_info": "Advanced Data Information", - "hex.yara.information_section.advanced_data_info.no_information": "No further information found", + "hex.yara.information_section.advanced_data_info.no_information": "No further information available.", + "hex.yara.information_section.advanced_data_info.no_information.add_new": "To add new information here, add new matching rules with the 'category' and 'name' meta tags to one of your Yara Advanced Analysis folders.", "hex.yara_rules.view.yara.error": "Yara Compiler error: {0}", "hex.yara_rules.view.yara.header.matches": "Matches", "hex.yara_rules.view.yara.header.rules": "Rules", diff --git a/plugins/yara_rules/source/content/data_information_sections.cpp b/plugins/yara_rules/source/content/data_information_sections.cpp index 5f9f00786..918413cdd 100644 --- a/plugins/yara_rules/source/content/data_information_sections.cpp +++ b/plugins/yara_rules/source/content/data_information_sections.cpp @@ -10,6 +10,7 @@ #include #include +#include namespace hex::plugin::yara { @@ -91,9 +92,11 @@ namespace hex::plugin::yara { ImGui::EndTable(); } } else { - ImGui::NewLine(); + ImGui::BeginDisabled(); ImGuiExt::TextFormattedCenteredHorizontal("{}", "hex.yara.information_section.advanced_data_info.no_information"_lang); - ImGui::NewLine(); + ImGui::EndDisabled(); + ImGui::SameLine(); + ImGuiExt::HelpHover("hex.yara.information_section.advanced_data_info.no_information.add_new"_lang, ICON_VS_INFO); } }