patterns: Updated pattern language
This commit is contained in:
parent
6a88c7cbaa
commit
491ee6aa2f
2
lib/external/pattern_language
vendored
2
lib/external/pattern_language
vendored
@ -1 +1 @@
|
|||||||
Subproject commit 4e9492ee72a7d518de3bcad6308ea4e53148a365
|
Subproject commit ed11c37fdfa6b6b0dcb90614bf88dbe49ece191f
|
@ -741,12 +741,12 @@ namespace hex::plugin::builtin {
|
|||||||
ImGui::TableNextColumn();
|
ImGui::TableNextColumn();
|
||||||
ImGui::TextFormatted("{}", pattern->getEndian() == std::endian::little ? "hex.builtin.common.little"_lang : "hex.builtin.common.big"_lang);
|
ImGui::TextFormatted("{}", pattern->getEndian() == std::endian::little ? "hex.builtin.common.little"_lang : "hex.builtin.common.big"_lang);
|
||||||
|
|
||||||
if (const auto &comment = pattern->getComment(); comment.has_value()) {
|
if (const auto &comment = pattern->getComment(); comment != nullptr) {
|
||||||
ImGui::TableNextRow();
|
ImGui::TableNextRow();
|
||||||
ImGui::TableNextColumn();
|
ImGui::TableNextColumn();
|
||||||
ImGui::TextFormatted("{}: ", "hex.builtin.common.comment"_lang);
|
ImGui::TextFormatted("{}: ", "hex.builtin.common.comment"_lang);
|
||||||
ImGui::TableNextColumn();
|
ImGui::TableNextColumn();
|
||||||
ImGui::TextWrapped("\"%s\"", pattern->getComment()->c_str());
|
ImGui::TextWrapped("\"%s\"", comment->c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui::EndTable();
|
ImGui::EndTable();
|
||||||
|
@ -277,7 +277,7 @@ namespace hex {
|
|||||||
|
|
||||||
|
|
||||||
void PatternDrawer::drawCommentTooltip(const pl::ptrn::Pattern &pattern) const {
|
void PatternDrawer::drawCommentTooltip(const pl::ptrn::Pattern &pattern) const {
|
||||||
if (ImGui::IsItemHovered(ImGuiHoveredFlags_AllowWhenBlockedByActiveItem) && pattern.getComment().has_value()) {
|
if (ImGui::IsItemHovered(ImGuiHoveredFlags_AllowWhenBlockedByActiveItem) && pattern.getComment() != nullptr) {
|
||||||
ImGui::BeginTooltip();
|
ImGui::BeginTooltip();
|
||||||
ImGui::TextUnformatted(pattern.getComment()->c_str());
|
ImGui::TextUnformatted(pattern.getComment()->c_str());
|
||||||
ImGui::EndTooltip();
|
ImGui::EndTooltip();
|
||||||
|
Loading…
Reference in New Issue
Block a user