From f9e960070d936306aafbef5ba19a8ee28af1112b Mon Sep 17 00:00:00 2001 From: WerWolv Date: Thu, 13 Oct 2022 15:14:16 +0200 Subject: [PATCH] nodes: Require shift to be held to enlarge visualizers --- plugins/builtin/source/content/data_processor_nodes.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/builtin/source/content/data_processor_nodes.cpp b/plugins/builtin/source/content/data_processor_nodes.cpp index 230058a48..29694f571 100644 --- a/plugins/builtin/source/content/data_processor_nodes.cpp +++ b/plugins/builtin/source/content/data_processor_nodes.cpp @@ -808,7 +808,7 @@ namespace hex::plugin::builtin { void drawNode() override { drawDigram(scaled({ 200, 200 })); - if (ImGui::IsItemHovered()) { + if (ImGui::IsItemHovered() && ImGui::IsKeyDown(ImGuiKey_LeftShift)) { ImGui::BeginTooltip(); drawDigram(scaled({ 600, 600 })); ImGui::EndTooltip(); @@ -899,7 +899,7 @@ namespace hex::plugin::builtin { void drawNode() override { drawLayeredDistribution(scaled({ 200, 200 })); - if (ImGui::IsItemHovered()) { + if (ImGui::IsItemHovered() && ImGui::IsKeyDown(ImGuiKey_LeftShift)) { ImGui::BeginTooltip(); drawLayeredDistribution(scaled({ 600, 600 })); ImGui::EndTooltip(); @@ -990,7 +990,7 @@ namespace hex::plugin::builtin { void drawNode() override { ImGui::Image(this->m_texture, scaled(ImVec2(this->m_texture.getAspectRatio() * 200, 200))); - if (ImGui::IsItemHovered()) { + if (ImGui::IsItemHovered() && ImGui::IsKeyDown(ImGuiKey_LeftShift)) { ImGui::BeginTooltip(); ImGui::Image(this->m_texture, scaled(ImVec2(this->m_texture.getAspectRatio() * 600, 600))); ImGui::EndTooltip(); @@ -1045,7 +1045,7 @@ namespace hex::plugin::builtin { void drawNode() override { drawPlot(scaled({ 400, 300 })); - if (ImGui::IsItemHovered()) { + if (ImGui::IsItemHovered() && ImGui::IsKeyDown(ImGuiKey_LeftShift)) { ImGui::BeginTooltip(); drawPlot(scaled({ 700, 550 })); ImGui::EndTooltip();