ImDrawList store pointer to their owner name for easier auditing/debugging. Metrics windows render clip rectangle when hovering.

This commit is contained in:
ocornut
2015-07-06 10:52:49 -06:00
parent 562aecdaa5
commit d6987d1586
2 changed files with 27 additions and 17 deletions

View File

@ -1029,11 +1029,12 @@ struct ImDrawList
ImVector<ImDrawVert> vtx_buffer; // Vertex buffer. Each command consume ImDrawCmd::vtx_count of those
// [Internal to ImGui]
const char* owner_name; // Pointer to owner window's name, if any
ImVector<ImVec4> clip_rect_stack; // [Internal]
ImVector<ImTextureID> texture_id_stack; // [Internal]
ImDrawVert* vtx_write; // [Internal] point within vtx_buffer after each add command (to avoid using the ImVector<> operators too much)
ImDrawList() { Clear(); }
ImDrawList() { owner_name = NULL; Clear(); }
IMGUI_API void Clear();
IMGUI_API void ClearFreeMemory();
IMGUI_API void PushClipRect(const ImVec4& clip_rect); // Scissoring. The values are x1, y1, x2, y2.