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())); }