fix: hopefully end infinite wrapping loops
This commit is contained in:
parent
2d7039deae
commit
2d71db2b5d
@ -67,7 +67,12 @@ internal static class ImGuiUtil {
|
|||||||
++text;
|
++text;
|
||||||
} // skip a space at start of line
|
} // skip a space at start of line
|
||||||
|
|
||||||
endPrevLine = ImGuiNative.ImFont_CalcWordWrapPositionA(ImGui.GetFont().NativePtr, ImGuiHelpers.GlobalScale, text, textEnd, widthLeft);
|
var newEnd = ImGuiNative.ImFont_CalcWordWrapPositionA(ImGui.GetFont().NativePtr, ImGuiHelpers.GlobalScale, text, textEnd, widthLeft);
|
||||||
|
if (newEnd == endPrevLine) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
endPrevLine = newEnd;
|
||||||
if (endPrevLine == null) {
|
if (endPrevLine == null) {
|
||||||
ImGui.TextUnformatted("");
|
ImGui.TextUnformatted("");
|
||||||
ImGui.TextUnformatted("");
|
ImGui.TextUnformatted("");
|
||||||
|
Loading…
Reference in New Issue
Block a user