-
Notifications
You must be signed in to change notification settings - Fork 53
Added addTextExtended and addTextExtendedUnformatted for additional AddText Functionalities #55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 7 commits
f9accd7
d9c2b30
7339c92
08cb42e
1f846a9
0aef646
859591f
bb26e05
6677213
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||
|---|---|---|---|---|---|---|---|---|
|
|
@@ -2519,6 +2519,20 @@ extern "C" | |||||||
| draw_list->AddText({pos[0], pos[1]}, col, text_begin, text_end); | ||||||||
| } | ||||||||
|
|
||||||||
| ZGUI_API void zguiDrawList_AddTextExtended( | ||||||||
| ImDrawList *draw_list, | ||||||||
| ImFont* font, | ||||||||
| float font_size, | ||||||||
| const float pos[2], | ||||||||
| ImU32 col, | ||||||||
| const char* text_begin, | ||||||||
| const char* text_end, | ||||||||
| float wrap_width, | ||||||||
| const float cpu_fine_clip_rect[][4]) | ||||||||
| { | ||||||||
| draw_list->AddText(font, font_size, {pos[0], pos[1]}, col, text_begin, text_end, wrap_width, (const ImVec4 *)&cpu_fine_clip_rect[0][0]); | ||||||||
|
||||||||
| draw_list->AddText(font, font_size, {pos[0], pos[1]}, col, text_begin, text_end, wrap_width, (const ImVec4 *)&cpu_fine_clip_rect[0][0]); | |
| const ImVec4* clip_rect = (cpu_fine_clip_rect != nullptr) ? (const ImVec4 *)&cpu_fine_clip_rect[0][0] : nullptr; | |
| draw_list->AddText(font, font_size, {pos[0], pos[1]}, col, text_begin, text_end, wrap_width, clip_rect); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice catch bot
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Alright, will change the name, and try to apply that suggestion for clip_rect to see if that works.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the naming is good as is?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, I thought the copilot suggests to rename the struct. If the name change isn't needed, then I am going to commit the suggested fix to the null pointer dereference only.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here you go; the suggestion is applied.
Uh oh!
There was an error while loading. Please reload this page.