From aa9ef10dc40afb4b6d7dae041296cbac9c3cc7cb Mon Sep 17 00:00:00 2001 From: Breno Cunha Queiroz Date: Thu, 24 Sep 2026 20:55:29 +0200 Subject: [PATCH] fix: avoid removed width parameter of ImGuiTextFilter::Draw() ImGui removed the `float width` parameter of `ImGuiTextFilter::Draw()` (ocornut/imgui@a14bebd), so the two-argument call in the style editor fails to compile against recent ImGui builds that disable obsolete functions. Set the width with `ImGui::SetNextItemWidth()` before the one-argument call instead; it behaves identically and compiles on all supported ImGui versions. Mirrors the same fix in ImPlot (epezent/implot#721). --- implot3d_demo.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/implot3d_demo.cpp b/implot3d_demo.cpp index 906d447..3f42a9b 100644 --- a/implot3d_demo.cpp +++ b/implot3d_demo.cpp @@ -2100,7 +2100,8 @@ void ShowStyleEditor(ImPlot3DStyle* ref) { ImGui::Checkbox("Only Modified Colors", &output_only_modified); static ImGuiTextFilter filter; - filter.Draw("Filter colors", ImGui::GetFontSize() * 16); + ImGui::SetNextItemWidth(ImGui::GetFontSize() * 16); + filter.Draw("Filter colors"); static ImGuiColorEditFlags alpha_flags = ImGuiColorEditFlags_AlphaPreviewHalf; #if IMGUI_VERSION_NUM < 19173