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
|
else
|
||||||
return left->getName() < right->getName();
|
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)
|
if (sortSpecs->Specs->SortDirection == ImGuiSortDirection_Ascending)
|
||||||
return left->getOffset() > right->getOffset();
|
return left->getOffset() > right->getOffset();
|
||||||
else
|
else
|
||||||
|
@ -21,7 +21,7 @@ namespace hex {
|
|||||||
if (ImGui::BeginTable("##patterndatatable", 6, ImGuiTableFlags_Borders | ImGuiTableFlags_Resizable | ImGuiTableFlags_Sortable | ImGuiTableFlags_Reorderable | ImGuiTableFlags_RowBg)) {
|
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("Color", 0, -1, ImGui::GetID("color"));
|
||||||
ImGui::TableSetupColumn("Name", 0, -1, ImGui::GetID("name"));
|
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("Size", 0, -1, ImGui::GetID("size"));
|
||||||
ImGui::TableSetupColumn("Type", 0, -1, ImGui::GetID("type"));
|
ImGui::TableSetupColumn("Type", 0, -1, ImGui::GetID("type"));
|
||||||
ImGui::TableSetupColumn("Value", 0, -1, ImGui::GetID("value"));
|
ImGui::TableSetupColumn("Value", 0, -1, ImGui::GetID("value"));
|
||||||
|
@ -73,7 +73,7 @@ namespace hex {
|
|||||||
if (ImGui::BeginTable("##strings", 3,
|
if (ImGui::BeginTable("##strings", 3,
|
||||||
ImGuiTableFlags_Borders | ImGuiTableFlags_Resizable | ImGuiTableFlags_Sortable |
|
ImGuiTableFlags_Borders | ImGuiTableFlags_Resizable | ImGuiTableFlags_Sortable |
|
||||||
ImGuiTableFlags_Reorderable | ImGuiTableFlags_RowBg)) {
|
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("Size", 0, -1, ImGui::GetID("size"));
|
||||||
ImGui::TableSetupColumn("String", 0, -1, ImGui::GetID("string"));
|
ImGui::TableSetupColumn("String", 0, -1, ImGui::GetID("string"));
|
||||||
|
|
||||||
@ -82,7 +82,7 @@ namespace hex {
|
|||||||
if (sortSpecs->SpecsDirty) {
|
if (sortSpecs->SpecsDirty) {
|
||||||
std::sort(this->m_foundStrings.begin(), this->m_foundStrings.end(),
|
std::sort(this->m_foundStrings.begin(), this->m_foundStrings.end(),
|
||||||
[&sortSpecs](FoundString &left, FoundString &right) -> bool {
|
[&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)
|
if (sortSpecs->Specs->SortDirection == ImGuiSortDirection_Ascending)
|
||||||
return left.offset > right.offset;
|
return left.offset > right.offset;
|
||||||
else
|
else
|
||||||
@ -120,9 +120,9 @@ namespace hex {
|
|||||||
|
|
||||||
ImGui::TableNextRow(ImGuiTableRowFlags_Headers);
|
ImGui::TableNextRow(ImGuiTableRowFlags_Headers);
|
||||||
ImGui::TableNextColumn();
|
ImGui::TableNextColumn();
|
||||||
ImGui::Text("0x%08lx:0x%08lx", foundString.offset, foundString.offset + foundString.size);
|
ImGui::Text("0x%08lx : 0x%08lx", foundString.offset, foundString.offset + foundString.size);
|
||||||
ImGui::TableNextColumn();
|
ImGui::TableNextColumn();
|
||||||
ImGui::Text("%08lx", foundString.size);
|
ImGui::Text("0x%04lx", foundString.size);
|
||||||
ImGui::TableNextColumn();
|
ImGui::TableNextColumn();
|
||||||
ImGui::Text("%s", foundString.string.c_str());
|
ImGui::Text("%s", foundString.string.c_str());
|
||||||
ImGui::TableSetBgColor(ImGuiTableBgTarget_RowBg0,
|
ImGui::TableSetBgColor(ImGuiTableBgTarget_RowBg0,
|
||||||
|
Loading…
Reference in New Issue
Block a user