From 186081d15ae8abab920ce7b0b420e7a4d2cc94c4 Mon Sep 17 00:00:00 2001 From: sonoro1234 Date: Thu, 23 Apr 2026 17:37:57 +0200 Subject: [PATCH 1/2] ImVec2 operator* is after imgui 19268 --- imgui_extra_math.inl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/imgui_extra_math.inl b/imgui_extra_math.inl index 8e2347f7..a460beb6 100644 --- a/imgui_extra_math.inl +++ b/imgui_extra_math.inl @@ -30,12 +30,12 @@ inline bool operator!=(const ImVec2& lhs, const ImVec2& rhs) return lhs.x != rhs.x || lhs.y != rhs.y; } # endif - +# if IMGUI_VERSION_NUM < 19268 inline ImVec2 operator*(const float lhs, const ImVec2& rhs) { return ImVec2(lhs * rhs.x, lhs * rhs.y); } - +#endif # if IMGUI_VERSION_NUM < 18955 inline ImVec2 operator-(const ImVec2& lhs) { From ca3d8d2f433ae9e3e3cca7ca609fbde09fbf533d Mon Sep 17 00:00:00 2001 From: Pascal Thomet Date: Wed, 13 May 2026 01:07:15 +0200 Subject: [PATCH 2/2] Fix for ImGui 1.92.8 AddRect/PathStroke arg swap MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Gate the 4 affected call sites (1 PathStroke + 3 AddRect) on IMGUI_VERSION_NUM < 19276 — last two args (flags, thickness) were swapped to (thickness, flags) in ocornut/imgui v1.92.8. --- imgui_node_editor.cpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/imgui_node_editor.cpp b/imgui_node_editor.cpp index 3ca9eb33..d2c37d19 100644 --- a/imgui_node_editor.cpp +++ b/imgui_node_editor.cpp @@ -560,7 +560,11 @@ static void ImDrawList_AddBezierWithArrows(ImDrawList* drawList, const ImCubicBe ImDrawList_PathBezierOffset(drawList, half_thickness, curve.P3, curve.P2, curve.P1, curve.P0); +#if IMGUI_VERSION_NUM < 19276 drawList->PathStroke(color, true, strokeThickness); +#else + drawList->PathStroke(color, strokeThickness, ImDrawFlags_Closed); +#endif } } @@ -584,8 +588,13 @@ void ed::Pin::Draw(ImDrawList* drawList, DrawFlags flags) if (m_BorderWidth > 0.0f) { FringeScaleScope fringe(1.0f); +#if IMGUI_VERSION_NUM < 19276 drawList->AddRect(m_Bounds.Min, m_Bounds.Max, m_BorderColor, m_Rounding, m_Corners, m_BorderWidth); +#else + drawList->AddRect(m_Bounds.Min, m_Bounds.Max, + m_BorderColor, m_Rounding, m_BorderWidth, m_Corners); +#endif } if (!Editor->IsSelected(m_Node)) @@ -683,10 +692,17 @@ void ed::Node::Draw(ImDrawList* drawList, DrawFlags flags) { FringeScaleScope fringe(1.0f); +#if IMGUI_VERSION_NUM < 19276 drawList->AddRect( m_GroupBounds.Min, m_GroupBounds.Max, m_GroupBorderColor, m_GroupRounding, c_AllRoundCornersFlags, m_GroupBorderWidth); +#else + drawList->AddRect( + m_GroupBounds.Min, + m_GroupBounds.Max, + m_GroupBorderColor, m_GroupRounding, m_GroupBorderWidth, c_AllRoundCornersFlags); +#endif } } @@ -738,8 +754,13 @@ void ed::Node::DrawBorder(ImDrawList* drawList, ImU32 color, float thickness, fl { const ImVec2 extraOffset = ImVec2(offset, offset); +#if IMGUI_VERSION_NUM < 19276 drawList->AddRect(m_Bounds.Min - extraOffset, m_Bounds.Max + extraOffset, color, ImMax(0.0f, m_Rounding + offset), c_AllRoundCornersFlags, thickness); +#else + drawList->AddRect(m_Bounds.Min - extraOffset, m_Bounds.Max + extraOffset, + color, ImMax(0.0f, m_Rounding + offset), thickness, c_AllRoundCornersFlags); +#endif } }