impr: Show byte relationship diagrams side by side if there's enough space
This commit is contained in:
parent
c46dea4c9e
commit
caf8fa8e25
@ -418,11 +418,31 @@ class InformationByteRelationshipAnalysis : public ContentRegistry::DataInformat
|
|||||||
void drawContent() override {
|
void drawContent() override {
|
||||||
auto availableWidth = ImGui::GetContentRegionAvail().x;
|
auto availableWidth = ImGui::GetContentRegionAvail().x;
|
||||||
|
|
||||||
ImGui::TextUnformatted("hex.builtin.information_section.relationship_analysis.digram"_lang);
|
if (availableWidth > 750_scaled) {
|
||||||
m_digram.draw({ availableWidth, availableWidth });
|
availableWidth /= 2;
|
||||||
|
availableWidth -= ImGui::GetStyle().FramePadding.x;
|
||||||
|
|
||||||
ImGui::TextUnformatted("hex.builtin.information_section.relationship_analysis.layered_distribution"_lang);
|
if (ImGui::BeginTable("##RelationshipTable", 2)) {
|
||||||
m_layeredDistribution.draw({ availableWidth, availableWidth });
|
ImGui::TableNextRow();
|
||||||
|
ImGui::TableNextColumn();
|
||||||
|
|
||||||
|
ImGui::TextUnformatted("hex.builtin.information_section.relationship_analysis.digram"_lang);
|
||||||
|
m_digram.draw({ availableWidth, availableWidth });
|
||||||
|
|
||||||
|
ImGui::TableNextColumn();
|
||||||
|
|
||||||
|
ImGui::TextUnformatted("hex.builtin.information_section.relationship_analysis.layered_distribution"_lang);
|
||||||
|
m_layeredDistribution.draw({ availableWidth, availableWidth });
|
||||||
|
|
||||||
|
ImGui::EndTable();
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
ImGui::TextUnformatted("hex.builtin.information_section.relationship_analysis.digram"_lang);
|
||||||
|
m_digram.draw({ availableWidth, availableWidth });
|
||||||
|
|
||||||
|
ImGui::TextUnformatted("hex.builtin.information_section.relationship_analysis.layered_distribution"_lang);
|
||||||
|
m_layeredDistribution.draw({ availableWidth, availableWidth });
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void load(const nlohmann::json &data) override {
|
void load(const nlohmann::json &data) override {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user