1
0
mirror of synced 2024-11-12 02:00:52 +01:00

Make array and pointer pattern data display more consistent with other types

This commit is contained in:
WerWolv 2020-11-22 02:25:25 +01:00
parent 033ef3889a
commit fbd4e593d2

View File

@ -182,7 +182,7 @@ namespace hex::lang {
ImGui::TableNextColumn(); ImGui::TableNextColumn();
ImGui::Text("%s", this->getTypeName().c_str()); ImGui::Text("%s", this->getTypeName().c_str());
ImGui::TableNextColumn(); ImGui::TableNextColumn();
ImGui::Text("*(%08llx)", data); ImGui::Text("*(0x%0*llx)", this->getSize() * 2, data);
if (open) { if (open) {
this->m_pointedAt->createEntry(provider); this->m_pointedAt->createEntry(provider);
@ -325,7 +325,7 @@ namespace hex::lang {
void createEntry(prv::Provider* &provider) override { void createEntry(prv::Provider* &provider) override {
ImGui::TableNextRow(ImGuiTableRowFlags_Headers); ImGui::TableNextRow(ImGuiTableRowFlags_Headers);
ImGui::TableNextColumn(); ImGui::TableNextColumn();
ImGui::ColorButton("color", ImColor(this->getColor()), ImGuiColorEditFlags_NoTooltip); ImGui::ColorButton("color", ImColor(this->getColor()), ImGuiColorEditFlags_NoTooltip | ImGuiColorEditFlags_AlphaPreview);
ImGui::TableNextColumn(); ImGui::TableNextColumn();
bool open = ImGui::TreeNodeEx(this->getName().c_str(), ImGuiTreeNodeFlags_SpanFullWidth); bool open = ImGui::TreeNodeEx(this->getName().c_str(), ImGuiTreeNodeFlags_SpanFullWidth);
ImGui::TableNextColumn(); ImGui::TableNextColumn();
@ -503,7 +503,7 @@ namespace hex::lang {
if (!foundValue) if (!foundValue)
valueString += "???"; valueString += "???";
this->createDefaultEntry(hex::format("%s (0x0*lx)", valueString.c_str(), this->getSize() * 2, value)); this->createDefaultEntry(hex::format("%s (0x%0*lx)", valueString.c_str(), this->getSize() * 2, value));
} }
std::string getTypeName() override { std::string getTypeName() override {