mirror of
https://github.com/ocornut/imgui.git
synced 2025-12-30 18:22:09 +00:00
ImStrv: fix in ShowIDStackToolWindow(), Font section. Font loading.
This commit is contained in:
@@ -16142,7 +16142,7 @@ void ImGui::ShowFontAtlas(ImFontAtlas* atlas)
|
||||
ImFontAtlasRect r = {};
|
||||
atlas->GetCustomRect(id, &r);
|
||||
ImStrv buf;
|
||||
ImFormatStringToTempBuffer(&buf, NULL, "ID:%08X, used:%d, { w:%3d, h:%3d } { x:%4d, y:%4d }", id, entry.IsUsed, r.w, r.h, r.x, r.y);
|
||||
ImFormatStringToTempBuffer(&buf, "ID:%08X, used:%d, { w:%3d, h:%3d } { x:%4d, y:%4d }", id, entry.IsUsed, r.w, r.h, r.x, r.y);
|
||||
TableNextColumn();
|
||||
Selectable(buf.Begin);
|
||||
if (IsItemHovered())
|
||||
@@ -17827,7 +17827,7 @@ void ImGui::ShowIDStackToolWindow(bool* p_open)
|
||||
if (c == '/')
|
||||
tool->ResultTempBuf.append("\\");
|
||||
if (c < 256 || !tool->OptHexEncodeNonAsciiChars)
|
||||
tool->ResultTempBuf.append(p, p_next);
|
||||
tool->ResultTempBuf.append(ImStrv(p, p_next));
|
||||
else for (; p < p_next; p++)
|
||||
tool->ResultTempBuf.appendf("\\x%02x", (unsigned char)*p);
|
||||
p = p_next;
|
||||
|
||||
@@ -3135,7 +3135,7 @@ ImFont* ImFontAtlas::AddFontFromFileTTF(ImStrv filename, float size_pixels, cons
|
||||
{
|
||||
if (font_cfg_template == NULL || (font_cfg_template->Flags & ImFontFlags_NoLoadError) == 0)
|
||||
{
|
||||
IMGUI_DEBUG_LOG("While loading '%s'\n", filename);
|
||||
IMGUI_DEBUG_LOG("While loading '%.*s'\n", filename.length(), filename.Begin);
|
||||
IM_ASSERT_USER_ERROR(0, "Could not load font file!");
|
||||
}
|
||||
return NULL;
|
||||
|
||||
Reference in New Issue
Block a user