mirror of
				https://github.com/Drezil/imgui.git
				synced 2025-11-04 07:01:04 +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
 | 
					    // Process clicking on the drag
 | 
				
			||||||
    if (g.ActiveId == id)
 | 
					    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)
 | 
					        if (g.ActiveIdIsJustActivated)
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
@@ -8916,11 +8921,6 @@ bool ImGui::DragBehavior(const ImRect& frame_bb, ImGuiID id, float* v, float v_s
 | 
				
			|||||||
            value_changed = true;
 | 
					            value_changed = true;
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
        else
 | 
					 | 
				
			||||||
        {
 | 
					 | 
				
			||||||
            ClearActiveID();
 | 
					 | 
				
			||||||
        }
 | 
					 | 
				
			||||||
    }
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    return value_changed;
 | 
					    return value_changed;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user