mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-09 23:54:20 +00:00
CalcWordWrapPosition() breaks on \n instead of relying on caller to do it + expose ImTextCalcWordWrapNextLineStart(). (#3237, #952, #1062, #7363)
Should be functional no-op, fingers crossed. Breaking on \n allows caller to count lines reliably.
This commit is contained in:
parent
f77f68a5ed
commit
8a35ce0e98
4 changed files with 8 additions and 15 deletions
|
|
@ -428,6 +428,7 @@ IMGUI_API int ImTextCountUtf8BytesFromChar(const char* in_text, const
|
|||
IMGUI_API int ImTextCountUtf8BytesFromStr(const ImWchar* in_text, const ImWchar* in_text_end); // return number of bytes to express string in UTF-8
|
||||
IMGUI_API const char* ImTextFindPreviousUtf8Codepoint(const char* in_text_start, const char* in_text_curr); // return previous UTF-8 code-point.
|
||||
IMGUI_API int ImTextCountLines(const char* in_text, const char* in_text_end); // return number of lines taken by text. trailing carriage return doesn't count as an extra line.
|
||||
IMGUI_API const char* ImTextCalcWordWrapNextLineStart(const char* text, const char* text_end); // trim trailing space and find beginning of next line
|
||||
|
||||
// Helpers: File System
|
||||
#ifdef IMGUI_DISABLE_FILE_FUNCTIONS
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue