mirror of
https://github.com/Drezil/imgui.git
synced 2024-11-15 01:17:00 +00:00
Fixed IsMouseDragging() (fix #260)
This commit is contained in:
parent
d76bc3434e
commit
18fa8e1c7e
@ -2978,6 +2978,8 @@ bool ImGui::IsMouseDragging(int button, float lock_threshold)
|
||||
{
|
||||
ImGuiState& g = *GImGui;
|
||||
IM_ASSERT(button >= 0 && button < IM_ARRAYSIZE(g.IO.MouseDown));
|
||||
if (!g.IO.MouseDown[button])
|
||||
return false;
|
||||
if (lock_threshold < 0.0f)
|
||||
lock_threshold = g.IO.MouseDragThreshold;
|
||||
return g.IO.MouseDragMaxDistanceSqr[button] >= lock_threshold * lock_threshold;
|
||||
|
Loading…
Reference in New Issue
Block a user