mirror of
https://github.com/ocornut/imgui.git
synced 2026-05-08 23:02:21 +00:00
ImStrv: moved double char* function signatures under #ifndef IMGUI_DISABLE_OBSOLETE_FUNCTIONS blocks + fixed various compiles errors/warnings.
This commit is contained in:
@@ -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++;
|
||||
}
|
||||
@@ -1990,7 +1990,7 @@ bool ImGui::BeginCombo(ImStrv label, ImStrv preview_value, ImGuiComboFlags flags
|
||||
if (flags & ImGuiComboFlags_CustomPreview)
|
||||
{
|
||||
g.ComboPreviewData.PreviewRect = ImRect(bb.Min.x, bb.Min.y, value_x2, bb.Max.y);
|
||||
IM_ASSERT(!preview_value);
|
||||
IM_ASSERT(preview_value.empty());
|
||||
}
|
||||
|
||||
// Render preview and label
|
||||
@@ -10633,9 +10633,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));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user