mirror of
https://github.com/Drezil/imgui.git
synced 2024-11-15 01:17:00 +00:00
Internals: DragBehavior: tweaks internals.
This commit is contained in:
parent
1d99b5f963
commit
a84aff1875
@ -9063,8 +9063,6 @@ bool ImGui::DragBehavior(const ImRect& frame_bb, ImGuiID id, float* v, float v_s
|
||||
RenderNavHighlight(frame_bb, id);
|
||||
RenderFrame(frame_bb.Min, frame_bb.Max, frame_col, true, style.FrameRounding);
|
||||
|
||||
bool value_changed = false;
|
||||
|
||||
// Process interacting with the drag
|
||||
if (g.ActiveId == id)
|
||||
{
|
||||
@ -9073,8 +9071,10 @@ bool ImGui::DragBehavior(const ImRect& frame_bb, ImGuiID id, float* v, float v_s
|
||||
else if (g.ActiveIdSource == ImGuiInputSource_Nav && g.NavActivatePressedId == id && !g.ActiveIdIsJustActivated)
|
||||
ClearActiveID();
|
||||
}
|
||||
if (g.ActiveId == id)
|
||||
{
|
||||
if (g.ActiveId != id)
|
||||
return false;
|
||||
|
||||
bool value_changed = false;
|
||||
if (g.ActiveIdIsJustActivated)
|
||||
{
|
||||
// Lock current value on click
|
||||
@ -9136,7 +9136,6 @@ bool ImGui::DragBehavior(const ImRect& frame_bb, ImGuiID id, float* v, float v_s
|
||||
*v = v_cur;
|
||||
value_changed = true;
|
||||
}
|
||||
}
|
||||
|
||||
return value_changed;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user