1
0
mirror of synced 2025-01-22 11:33:46 +01:00

patterns: Added error pattern to pattern drawer

This commit is contained in:
WerWolv 2025-01-16 17:08:49 +01:00
parent 0303cd0ad0
commit 69a9af5322
2 changed files with 11 additions and 0 deletions

View File

@ -10,6 +10,7 @@
#include <pl/formatters.hpp> #include <pl/formatters.hpp>
#include <set> #include <set>
#include <pl/patterns/pattern_error.hpp>
struct ImGuiTableSortSpecs; struct ImGuiTableSortSpecs;
@ -64,6 +65,7 @@ namespace hex::ui {
void visit(pl::ptrn::PatternUnsigned& pattern) override; void visit(pl::ptrn::PatternUnsigned& pattern) override;
void visit(pl::ptrn::PatternWideCharacter& pattern) override; void visit(pl::ptrn::PatternWideCharacter& pattern) override;
void visit(pl::ptrn::PatternWideString& pattern) override; void visit(pl::ptrn::PatternWideString& pattern) override;
void visit(pl::ptrn::PatternError& pattern) override;
void visit(pl::ptrn::Pattern& pattern) override; void visit(pl::ptrn::Pattern& pattern) override;
private: private:

View File

@ -984,6 +984,15 @@ namespace hex::ui {
} }
} }
void PatternDrawer::visit(pl::ptrn::PatternError& pattern) {
ImGui::PushStyleColor(ImGuiCol_Text, ImGuiExt::GetCustomColorVec4(ImGuiCustomCol_LoggerError));
createDefaultEntry(pattern);
drawValueColumn(pattern);
drawCommentColumn(pattern);
ImGui::PopStyleColor();
}
void PatternDrawer::visit(pl::ptrn::Pattern& pattern) { void PatternDrawer::visit(pl::ptrn::Pattern& pattern) {
createDefaultEntry(pattern); createDefaultEntry(pattern);
drawValueColumn(pattern); drawValueColumn(pattern);