mirror of
https://github.com/ocornut/imgui.git
synced 2026-09-29 04:35:49 +03:00
ImStrv: moved double char* function signatures under #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS blocks + fixed various compiles errors/warnings.
This commit is contained in:
parent
675348f183
commit
84ccc62ad8
5 changed files with 66 additions and 60 deletions
|
|
@ -210,7 +210,7 @@ void ImGui::TextEx(ImStrv text, ImGuiTextFlags flags)
|
|||
if (!line_end)
|
||||
line_end = text_end;
|
||||
if ((flags & ImGuiTextFlags_NoWidthForLargeClippedText) == 0)
|
||||
text_size.x = ImMax(text_size.x, CalcTextSize(line, line_end).x);
|
||||
text_size.x = ImMax(text_size.x, CalcTextSize(ImStrv(line, line_end)).x);
|
||||
line = line_end + 1;
|
||||
lines_skipped++;
|
||||
}
|
||||
|
|
@ -230,7 +230,7 @@ void ImGui::TextEx(ImStrv text, ImGuiTextFlags flags)
|
|||
const char* line_end = (const char*)ImMemchr(line, '\n', text_end - line);
|
||||
if (!line_end)
|
||||
line_end = text_end;
|
||||
text_size.x = ImMax(text_size.x, CalcTextSize(line, line_end).x);
|
||||
text_size.x = ImMax(text_size.x, CalcTextSize(ImStrv(line, line_end)).x);
|
||||
RenderText(pos, ImStrv(line, line_end), false);
|
||||
line = line_end + 1;
|
||||
line_rect.Min.y += line_height;
|
||||
|
|
@ -246,7 +246,7 @@ void ImGui::TextEx(ImStrv text, ImGuiTextFlags flags)
|
|||
if (!line_end)
|
||||
line_end = text_end;
|
||||
if ((flags & ImGuiTextFlags_NoWidthForLargeClippedText) == 0)
|
||||
text_size.x = ImMax(text_size.x, CalcTextSize(line, line_end).x);
|
||||
text_size.x = ImMax(text_size.x, CalcTextSize(ImStrv(line, line_end)).x);
|
||||
line = line_end + 1;
|
||||
lines_skipped++;
|
||||
}
|
||||
|
|
@ -10894,9 +10894,9 @@ bool ImGui::TabItemEx(ImGuiTabBar* tab_bar, ImStrv label, bool* p_open, ImGui
|
|||
}
|
||||
else
|
||||
{
|
||||
char zero_c = 0;
|
||||
tab->NameOffset = (ImS32)tab_bar->TabsNames.size();
|
||||
tab_bar->TabsNames.append(label_for_display);
|
||||
char zero_c = 0;
|
||||
tab_bar->TabsNames.append(ImStrv(&zero_c, &zero_c + 1));
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue