Removed CalcItemRectClosestPoint() which was weird and not really used by anyone except demo code. If you need it it's easy to replicate on your side.

Removed internal corresponding ImRect::GetClosestPoint() for now.
Essentially revert dcaafffe0e.
This commit is contained in:
omar
2017-12-29 17:59:13 +01:00
parent 9f8632b131
commit 2dd2ca0096
4 changed files with 3 additions and 20 deletions

View File

@ -1894,7 +1894,7 @@ void ImGui::ShowDemoWindow(bool* p_open)
// Draw a line between the button and the mouse cursor
ImDrawList* draw_list = ImGui::GetWindowDrawList();
draw_list->PushClipRectFullScreen();
draw_list->AddLine(ImGui::CalcItemRectClosestPoint(io.MousePos, true, -2.0f), io.MousePos, ImColor(ImGui::GetStyle().Colors[ImGuiCol_Button]), 4.0f);
draw_list->AddLine(io.MouseClickedPos[0], io.MousePos, ImGui::GetColorU32(ImGuiCol_Button), 4.0f);
draw_list->PopClipRect();
// Drag operations gets "unlocked" when the mouse has moved past a certain threshold (the default threshold is stored in io.MouseDragThreshold)