Nav: DragBehavior: Tweaks (to take the noise out of the next commit).

docking
omar 7 years ago
parent e5e3cc617e
commit 4932303e62

@ -8852,7 +8852,12 @@ bool ImGui::DragBehavior(const ImRect& frame_bb, ImGuiID id, float* v, float v_s
// Process clicking on the drag
if (g.ActiveId == id)
{
if (g.IO.MouseDown[0] || g.NavActivateDownId == id)
if (g.ActiveIdSource == ImGuiInputSource_Mouse && !g.IO.MouseDown[0])
ClearActiveID();
else if (g.ActiveIdSource == ImGuiInputSource_Nav && g.NavActivateDownId != id)
ClearActiveID();
}
if (g.ActiveId == id)
{
if (g.ActiveIdIsJustActivated)
{
@ -8916,11 +8921,6 @@ bool ImGui::DragBehavior(const ImRect& frame_bb, ImGuiID id, float* v, float v_s
value_changed = true;
}
}
else
{
ClearActiveID();
}
}
return value_changed;
}

Loading…
Cancel
Save