1
0
mirror of synced 2024-11-14 02:57:41 +01:00

patterns: Allow bitfield fields to be selected

This commit is contained in:
WerWolv 2022-03-17 23:31:36 +01:00
parent ec9a947259
commit 7061a1ebfa

View File

@ -24,6 +24,10 @@ namespace hex::pl {
ImGui::TableNextRow();
ImGui::TableNextColumn();
ImGui::TextUnformatted(this->getDisplayName().c_str());
ImGui::SameLine();
if (ImGui::Selectable(("##PatternLine"s + std::to_string(u64(this))).c_str(), false, ImGuiSelectableFlags_SpanAllColumns | ImGuiSelectableFlags_AllowItemOverlap)) {
ImHexApi::HexEditor::setSelection(this->getOffset(), this->getSize());
}
ImGui::TableNextColumn();
ImGui::ColorButton("color", ImColor(this->getColor()), ImGuiColorEditFlags_NoTooltip, ImVec2(ImGui::GetColumnWidth(), ImGui::GetTextLineHeight()));
ImGui::TableNextColumn();