mirror of
https://github.com/ocornut/imgui.git
synced 2026-02-02 03:40:06 +00:00
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:
parent
9f8632b131
commit
2dd2ca0096
4 changed files with 3 additions and 20 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue