fix: Incorrect word wrap calculation after ImGui update

#2325
This commit is contained in:
WerWolv
2025-08-27 23:14:07 +02:00
parent e0fccacc32
commit db573840b0

View File

@@ -1046,7 +1046,7 @@ namespace ImGuiExt {
std::string drawString;
auto textEnd = text + strlen(text);
for (auto wrapPos = text; wrapPos != textEnd;) {
wrapPos = ImGui::GetFont()->CalcWordWrapPosition(1, wrapPos, textEnd, availableSpace.x * 0.8F);
wrapPos = ImGui::GetFont()->CalcWordWrapPosition(GetFontSize(), wrapPos, textEnd, availableSpace.x * 0.8F);
drawString += std::string(text, wrapPos) + "\n";
text = wrapPos;
}