From bbed1c4bbbcaf52298b7b2ba9fb9ffa237c4e778 Mon Sep 17 00:00:00 2001 From: Webster Sheets Date: Mon, 21 Jun 2021 12:54:04 -0400 Subject: [PATCH] Use GetContentRegionAvail().x --- imgui_demo.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imgui_demo.cpp b/imgui_demo.cpp index 913362c3..6d6449d7 100644 --- a/imgui_demo.cpp +++ b/imgui_demo.cpp @@ -1085,7 +1085,7 @@ static void ShowDemoWindowWidgets() ImGui::SameLine(); HelpMarker("Use SetCursorPos and TextWrapPos to horizontally align text blocks."); ImGui::PushTextAlignment(text_align); - float max_wrap_width = ImGui::GetContentRegionAvailWidth(); + float max_wrap_width = ImGui::GetContentRegionAvail().x; if (wrap_width < max_wrap_width) { ImGui::SetCursorPos(ImVec2(ImGui::GetCursorPosX() + fabs(max_wrap_width - wrap_width) * text_align, ImGui::GetCursorPosY())); }