mirror of
				https://github.com/Drezil/imgui.git
				synced 2025-10-31 21:21:06 +01:00 
			
		
		
		
	Overlap: moved ImGuiItemflags_AllowOverlap handling from ButtoBehavior() to ItemHoverable() now that it is possible. (#6512, #3909, #517)
This allows DragXXX, SliderXXX, PlotXXX etc to honor SetNextItemAllowOverlap().
This commit is contained in:
		| @@ -4069,6 +4069,15 @@ bool ImGui::ItemHoverable(const ImRect& bb, ImGuiID id, ImGuiItemFlags item_flag | ||||
|             return false; | ||||
|  | ||||
|         SetHoveredID(id); | ||||
|  | ||||
|         // AllowOverlap mode (rarely used) requires previous frame HoveredId to be null or to match. | ||||
|         // This allows using patterns where a later submitted widget overlaps a previous one. Generally perceived as a front-to-back hit-test. | ||||
|         if (item_flags & ImGuiItemflags_AllowOverlap) | ||||
|         { | ||||
|             g.HoveredIdAllowOverlap = true; | ||||
|             if (g.HoveredIdPreviousFrame != id) | ||||
|                 return false; | ||||
|         } | ||||
|     } | ||||
|  | ||||
|     // When disabled we'll return false but still set HoveredId | ||||
|   | ||||
		Reference in New Issue
	
	Block a user