mirror of
https://github.com/ocornut/imgui.git
synced 2024-12-01 02:37:24 +01:00
Internals: DragFloat: Removed DragSpeedScaleFast/DragSpeedScaleSlow since it's not yet usable and Nav version doesn't have an equivalent.
This commit is contained in:
parent
4780ac1ca4
commit
3f04fd0644
@ -9154,10 +9154,10 @@ bool ImGui::DragBehavior(const ImRect& frame_bb, ImGuiID id, float* v, float v_s
|
|||||||
if (g.ActiveIdSource == ImGuiInputSource_Mouse && IsMousePosValid())
|
if (g.ActiveIdSource == ImGuiInputSource_Mouse && IsMousePosValid())
|
||||||
{
|
{
|
||||||
adjust_delta = mouse_drag_delta.x - g.DragLastMouseDelta.x;
|
adjust_delta = mouse_drag_delta.x - g.DragLastMouseDelta.x;
|
||||||
if (g.IO.KeyShift && g.DragSpeedScaleFast >= 0.0f)
|
if (g.IO.KeyAlt)
|
||||||
adjust_delta *= g.DragSpeedScaleFast;
|
adjust_delta *= 1.0f/100.0f;
|
||||||
if (g.IO.KeyAlt && g.DragSpeedScaleSlow >= 0.0f)
|
if (g.IO.KeyShift)
|
||||||
adjust_delta *= g.DragSpeedScaleSlow;
|
adjust_delta *= 10.0f;
|
||||||
g.DragLastMouseDelta.x = mouse_drag_delta.x;
|
g.DragLastMouseDelta.x = mouse_drag_delta.x;
|
||||||
}
|
}
|
||||||
if (g.ActiveIdSource == ImGuiInputSource_Nav)
|
if (g.ActiveIdSource == ImGuiInputSource_Nav)
|
||||||
|
@ -671,8 +671,6 @@ struct ImGuiContext
|
|||||||
float DragCurrentValue; // Currently dragged value, always float, not rounded by end-user precision settings
|
float DragCurrentValue; // Currently dragged value, always float, not rounded by end-user precision settings
|
||||||
ImVec2 DragLastMouseDelta;
|
ImVec2 DragLastMouseDelta;
|
||||||
float DragSpeedDefaultRatio; // If speed == 0.0f, uses (max-min) * DragSpeedDefaultRatio
|
float DragSpeedDefaultRatio; // If speed == 0.0f, uses (max-min) * DragSpeedDefaultRatio
|
||||||
float DragSpeedScaleSlow;
|
|
||||||
float DragSpeedScaleFast;
|
|
||||||
ImVec2 ScrollbarClickDeltaToGrabCenter; // Distance between mouse and center of grab box, normalized in parent space. Use storage?
|
ImVec2 ScrollbarClickDeltaToGrabCenter; // Distance between mouse and center of grab box, normalized in parent space. Use storage?
|
||||||
int TooltipOverrideCount;
|
int TooltipOverrideCount;
|
||||||
ImVector<char> PrivateClipboard; // If no custom clipboard handler is defined
|
ImVector<char> PrivateClipboard; // If no custom clipboard handler is defined
|
||||||
@ -776,8 +774,6 @@ struct ImGuiContext
|
|||||||
DragCurrentValue = 0.0f;
|
DragCurrentValue = 0.0f;
|
||||||
DragLastMouseDelta = ImVec2(0.0f, 0.0f);
|
DragLastMouseDelta = ImVec2(0.0f, 0.0f);
|
||||||
DragSpeedDefaultRatio = 1.0f / 100.0f;
|
DragSpeedDefaultRatio = 1.0f / 100.0f;
|
||||||
DragSpeedScaleSlow = 1.0f / 100.0f;
|
|
||||||
DragSpeedScaleFast = 10.0f;
|
|
||||||
ScrollbarClickDeltaToGrabCenter = ImVec2(0.0f, 0.0f);
|
ScrollbarClickDeltaToGrabCenter = ImVec2(0.0f, 0.0f);
|
||||||
TooltipOverrideCount = 0;
|
TooltipOverrideCount = 0;
|
||||||
PlatformImePos = PlatformImeLastPos = ImVec2(FLT_MAX, FLT_MAX);
|
PlatformImePos = PlatformImeLastPos = ImVec2(FLT_MAX, FLT_MAX);
|
||||||
|
Loading…
Reference in New Issue
Block a user