mirror of
https://github.com/ocornut/imgui.git
synced 2025-01-31 03:53:44 +01:00
ImStrv: Fixed various compile errors/warnings.
This commit is contained in:
parent
ca67eae2f5
commit
1999d2d08c
@ -11621,7 +11621,7 @@ void ImGui::OpenPopup(ImStrv str_id, ImGuiPopupFlags popup_flags)
|
||||
{
|
||||
ImGuiContext& g = *GImGui;
|
||||
ImGuiID id = g.CurrentWindow->GetID(str_id);
|
||||
IMGUI_DEBUG_LOG_POPUP("[popup] OpenPopup(\"%.*s\" -> 0x%08X\n", (int)(str_id.End - str_id.Begin), str_id, id);
|
||||
IMGUI_DEBUG_LOG_POPUP("[popup] OpenPopup(\"%.*s\" -> 0x%08X\n", (int)(str_id.End - str_id.Begin), str_id.Begin, id);
|
||||
OpenPopupEx(id, popup_flags);
|
||||
}
|
||||
|
||||
@ -15155,7 +15155,7 @@ void ImGui::DebugRenderKeyboardPreview(ImDrawList* draw_list)
|
||||
// Helper tool to diagnose between text encoding issues and font loading issues. Pass your UTF-8 string and verify that there are correct.
|
||||
void ImGui::DebugTextEncoding(ImStrv str)
|
||||
{
|
||||
Text("Text: \"%s\"", str);
|
||||
Text("Text: \"%.*s\"", (int)str.length(), str.Begin);
|
||||
if (!BeginTable("##DebugTextEncoding", 4, ImGuiTableFlags_Borders | ImGuiTableFlags_RowBg | ImGuiTableFlags_SizingFixedFit | ImGuiTableFlags_Resizable))
|
||||
return;
|
||||
TableSetupColumn("Offset");
|
||||
@ -15168,7 +15168,7 @@ void ImGui::DebugTextEncoding(ImStrv str)
|
||||
unsigned int c;
|
||||
const int c_utf8_len = ImTextCharFromUtf8(&c, p, str.End);
|
||||
TableNextColumn();
|
||||
Text("%d", (int)(size_t)(p - str));
|
||||
Text("%d", (int)(p - str.Begin));
|
||||
TableNextColumn();
|
||||
for (int byte_index = 0; byte_index < c_utf8_len; byte_index++)
|
||||
{
|
||||
@ -15178,7 +15178,7 @@ void ImGui::DebugTextEncoding(ImStrv str)
|
||||
}
|
||||
TableNextColumn();
|
||||
if (GetFont()->FindGlyphNoFallback((ImWchar)c))
|
||||
TextUnformatted(p, p + c_utf8_len);
|
||||
TextUnformatted(ImStrv(p, p + c_utf8_len));
|
||||
else
|
||||
TextUnformatted((c == IM_UNICODE_CODEPOINT_INVALID) ? "[invalid]" : "[missing]");
|
||||
TableNextColumn();
|
||||
|
Loading…
x
Reference in New Issue
Block a user