mirror of
				https://github.com/Drezil/imgui.git
				synced 2025-11-03 22:51:06 +01:00 
			
		
		
		
	Nav: DragBehavior: Tweaks (to take the noise out of the next commit).
This commit is contained in:
		
							
								
								
									
										12
									
								
								imgui.cpp
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								imgui.cpp
									
									
									
									
									
								
							@@ -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;
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user