1
0
mirror of synced 2025-01-30 11:37:32 +01:00

ui: Add result count to string view (#353)

* Add result count to string view

* Localization

* formating and logic fix
This commit is contained in:
qdlmcfresh 2021-11-30 21:02:37 +01:00 committed by GitHub
parent e8bc94a25a
commit 0da31b6bbb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 3 deletions

View File

@ -285,6 +285,7 @@ namespace hex::plugin::builtin {
{ "hex.view.strings.filter", "Filter" },
{ "hex.view.strings.extract", "Extrahieren" },
{ "hex.view.strings.regex_error", "Ungültiges Regex" },
{ "hex.view.strings.results", "{0} Ergebnisse" },
{ "hex.view.strings.searching", "Suchen..." },
{ "hex.view.strings.offset", "Offset" },
{ "hex.view.strings.size", "Grösse" },

View File

@ -288,6 +288,7 @@ namespace hex::plugin::builtin {
{ "hex.view.strings.filter", "Filter" },
{ "hex.view.strings.extract", "Extract" },
{ "hex.view.strings.regex_error", "Invalid regex" },
{ "hex.view.strings.results", "Found {0} occurrences" },
{ "hex.view.strings.searching", "Searching..." },
{ "hex.view.strings.offset", "Offset" },
{ "hex.view.strings.size", "Size" },

View File

@ -1,6 +1,7 @@
#include "views/view_strings.hpp"
#include <hex/providers/provider.hpp>
#include <hex/helpers/fmt.hpp>
#include <cstring>
#include <thread>
@ -138,6 +139,10 @@ namespace hex {
ImGui::SameLine();
ImGui::TextSpinner("hex.view.strings.searching"_lang);
}
else if (this->m_foundStrings.size() > 0) {
ImGui::SameLine();
ImGui::TextUnformatted(hex::format("hex.view.strings.results"_lang, this->m_filterIndices.size()).c_str());
}
ImGui::Separator();