mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-06 04:58:47 +02:00
Internals: Renamed IsCharIsSpace() to IsCharIsBlank*() to match standard terminlogy and added ascii/u16 variations.
This commit is contained in:
@ -2351,7 +2351,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)
|
||||
{
|
||||
@ -2434,7 +2434,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;
|
||||
}
|
||||
@ -2559,7 +2559,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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user