Nav: DragBehavior: Fix for fast speed (#323 #180)

This commit is contained in:
ocornut 2016-08-07 20:31:51 +02:00
parent 761a74c62b
commit 09cba02d3f

View File

@ -7676,7 +7676,7 @@ bool ImGui::DragBehavior(const ImRect& frame_bb, ImGuiID id, float* v, float v_s
} }
if (g.ActiveIdSource == ImGuiInputSource_Nav) if (g.ActiveIdSource == ImGuiInputSource_Nav)
{ {
adjust_delta = GetNavInputAmount2d(0, ImGuiNavReadMode_RepeatFast, 1.0f/10.0f, 1.0f).x; adjust_delta = GetNavInputAmount2d(0, ImGuiNavReadMode_RepeatFast, 1.0f/10.0f, 10.0f).x;
} }
adjust_delta *= v_speed; adjust_delta *= v_speed;
g.DragLastMouseDelta.x = mouse_drag_delta.x; g.DragLastMouseDelta.x = mouse_drag_delta.x;