Bring strings view and pattern data view in line with each other
This commit is contained in:
parent
763d1f0e2d
commit
f36014194d
@ -73,7 +73,7 @@ namespace hex::lang {
|
||||
else
|
||||
return left->getName() < right->getName();
|
||||
}
|
||||
else if (sortSpecs->Specs->ColumnUserID == ImGui::GetID("position")) {
|
||||
else if (sortSpecs->Specs->ColumnUserID == ImGui::GetID("offset")) {
|
||||
if (sortSpecs->Specs->SortDirection == ImGuiSortDirection_Ascending)
|
||||
return left->getOffset() > right->getOffset();
|
||||
else
|
||||
|
@ -21,7 +21,7 @@ namespace hex {
|
||||
if (ImGui::BeginTable("##patterndatatable", 6, ImGuiTableFlags_Borders | ImGuiTableFlags_Resizable | ImGuiTableFlags_Sortable | ImGuiTableFlags_Reorderable | ImGuiTableFlags_RowBg)) {
|
||||
ImGui::TableSetupColumn("Color", 0, -1, ImGui::GetID("color"));
|
||||
ImGui::TableSetupColumn("Name", 0, -1, ImGui::GetID("name"));
|
||||
ImGui::TableSetupColumn("Position", 0, -1, ImGui::GetID("position"));
|
||||
ImGui::TableSetupColumn("Offset", 0, -1, ImGui::GetID("offset"));
|
||||
ImGui::TableSetupColumn("Size", 0, -1, ImGui::GetID("size"));
|
||||
ImGui::TableSetupColumn("Type", 0, -1, ImGui::GetID("type"));
|
||||
ImGui::TableSetupColumn("Value", 0, -1, ImGui::GetID("value"));
|
||||
|
@ -73,7 +73,7 @@ namespace hex {
|
||||
if (ImGui::BeginTable("##strings", 3,
|
||||
ImGuiTableFlags_Borders | ImGuiTableFlags_Resizable | ImGuiTableFlags_Sortable |
|
||||
ImGuiTableFlags_Reorderable | ImGuiTableFlags_RowBg)) {
|
||||
ImGui::TableSetupColumn("Position", 0, -1, ImGui::GetID("position"));
|
||||
ImGui::TableSetupColumn("Offset", 0, -1, ImGui::GetID("offset"));
|
||||
ImGui::TableSetupColumn("Size", 0, -1, ImGui::GetID("size"));
|
||||
ImGui::TableSetupColumn("String", 0, -1, ImGui::GetID("string"));
|
||||
|
||||
@ -82,7 +82,7 @@ namespace hex {
|
||||
if (sortSpecs->SpecsDirty) {
|
||||
std::sort(this->m_foundStrings.begin(), this->m_foundStrings.end(),
|
||||
[&sortSpecs](FoundString &left, FoundString &right) -> bool {
|
||||
if (sortSpecs->Specs->ColumnUserID == ImGui::GetID("position")) {
|
||||
if (sortSpecs->Specs->ColumnUserID == ImGui::GetID("offset")) {
|
||||
if (sortSpecs->Specs->SortDirection == ImGuiSortDirection_Ascending)
|
||||
return left.offset > right.offset;
|
||||
else
|
||||
@ -122,7 +122,7 @@ namespace hex {
|
||||
ImGui::TableNextColumn();
|
||||
ImGui::Text("0x%08lx : 0x%08lx", foundString.offset, foundString.offset + foundString.size);
|
||||
ImGui::TableNextColumn();
|
||||
ImGui::Text("%08lx", foundString.size);
|
||||
ImGui::Text("0x%04lx", foundString.size);
|
||||
ImGui::TableNextColumn();
|
||||
ImGui::Text("%s", foundString.string.c_str());
|
||||
ImGui::TableSetBgColor(ImGuiTableBgTarget_RowBg0,
|
||||
|
Loading…
Reference in New Issue
Block a user