patterns: Added support for the new [[sealed]] attribute

This commit is contained in:
WerWolv
2022-07-31 15:10:59 +02:00
parent 4d3538781b
commit de2458f72d
2 changed files with 7 additions and 2 deletions

View File

@@ -361,7 +361,12 @@ namespace hex {
}
bool PatternDrawer::createTreeNode(const pl::Pattern& pattern) const {
return ImGui::TreeNodeEx(pattern.getDisplayName().c_str(), ImGuiTreeNodeFlags_SpanFullWidth);
if (pattern.isSealed()) {
ImGui::Selectable(pattern.getDisplayName().c_str(), false, ImGuiSelectableFlags_SpanAllColumns | ImGuiSelectableFlags_AllowItemOverlap);
return false;
}
else
return ImGui::TreeNodeEx(pattern.getDisplayName().c_str(), ImGuiTreeNodeFlags_SpanFullWidth);
}
void PatternDrawer::drawTypenameColumn(const pl::Pattern& pattern, const std::string& pattern_name) const {