mirror of
https://github.com/ocornut/imgui.git
synced 2026-02-09 04:50:11 +00:00
Merge branch 'data_types'
# Conflicts: # CHANGELOG.txt # imgui.cpp
This commit is contained in:
commit
8149408408
7 changed files with 602 additions and 457 deletions
|
|
@ -2370,7 +2370,7 @@ const char* ImFont::CalcWordWrapPositionA(float scale, const char* text, const c
|
|||
}
|
||||
|
||||
const float char_width = ((int)c < IndexAdvanceX.Size ? IndexAdvanceX[(int)c] : FallbackAdvanceX);
|
||||
if (ImCharIsSpace(c))
|
||||
if (ImCharIsBlankW(c))
|
||||
{
|
||||
if (inside_word)
|
||||
{
|
||||
|
|
@ -2453,7 +2453,7 @@ ImVec2 ImFont::CalcTextSizeA(float size, float max_width, float wrap_width, cons
|
|||
while (s < text_end)
|
||||
{
|
||||
const char c = *s;
|
||||
if (ImCharIsSpace((unsigned int)c)) { s++; } else if (c == '\n') { s++; break; } else { break; }
|
||||
if (ImCharIsBlankA(c)) { s++; } else if (c == '\n') { s++; break; } else { break; }
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
|
@ -2578,7 +2578,7 @@ void ImFont::RenderText(ImDrawList* draw_list, float size, ImVec2 pos, ImU32 col
|
|||
while (s < text_end)
|
||||
{
|
||||
const char c = *s;
|
||||
if (ImCharIsSpace((unsigned int)c)) { s++; } else if (c == '\n') { s++; break; } else { break; }
|
||||
if (ImCharIsBlankA(c)) { s++; } else if (c == '\n') { s++; break; } else { break; }
|
||||
}
|
||||
continue;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue