imgui不换行
在IMGUI中,默认情况下,文本会自动换行。如果你想在IMGUI中强制不换行,你可以使用ImGui::PushTextWrapPos函数来临时禁用自动换行,然后使用ImGui::PopTextWrapPos函数来恢复自动换行。
以下是一个示例:
ImGui::PushTextWrapPos(0.0f); // 禁用自动换行
ImGui::Text("This is a long text that will not wrap.");
ImGui::PopTextWrapPos(); // 恢复自动换行
在上面的示例中,文本"This is a long text that will not wrap."将不会自动换行。
原文地址: https://www.cveoy.top/t/topic/hHDS 著作权归作者所有。请勿转载和采集!