diff --git a/imgui.cpp b/imgui.cpp index 27f63664c..945ebb9d6 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -13836,7 +13836,7 @@ const ImGuiPayload* ImGui::AcceptDragDropPayload(const char* type, ImGuiDragDrop // FIXME-DRAG: Settle on a proper default visuals for drop target. r.Expand(3.5f); bool push_clip_rect = !window->ClipRect.Contains(r); - if (push_clip_rect) window->DrawList->PushClipRectFullScreen(); + if (push_clip_rect) window->DrawList->PushClipRect(r.Min-ImVec2(1,1), r.Max+ImVec2(1,1)); window->DrawList->AddRect(r.Min, r.Max, GetColorU32(ImGuiCol_DragDropTarget), 0.0f, ~0, 2.0f); if (push_clip_rect) window->DrawList->PopClipRect(); } diff --git a/imgui_draw.cpp b/imgui_draw.cpp index bf5558d45..43c4445a0 100644 --- a/imgui_draw.cpp +++ b/imgui_draw.cpp @@ -2342,6 +2342,8 @@ void ImFont::GrowIndex(int new_size) IndexLookup.resize(new_size, (unsigned short)-1); } +// x0/y0/x1/y1 are offset from the character upper-left layout position, in pixels. Therefore x0/y0 are often fairly close to zero. +// Not to be mistaken with texture coordinates, which are held by u0/v0/u1/v1 in normalized format (0.0..1.0 on each texture axis). void ImFont::AddGlyph(ImWchar codepoint, float x0, float y0, float x1, float y1, float u0, float v0, float u1, float v1, float advance_x) { Glyphs.resize(Glyphs.Size + 1);