mirror of
				https://github.com/Drezil/imgui.git
				synced 2025-11-03 22:51:06 +01:00 
			
		
		
		
	Added IsAnyWindowFocused() (from Nav branch).
This commit is contained in:
		@@ -3399,6 +3399,12 @@ bool ImGui::IsAnyWindowHovered()
 | 
			
		||||
    return g.HoveredWindow != NULL;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
bool ImGui::IsAnyWindowFocused()
 | 
			
		||||
{
 | 
			
		||||
    ImGuiContext& g = *GImGui;
 | 
			
		||||
    return g.NavWindow != NULL;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
static bool IsKeyPressedMap(ImGuiKey key, bool repeat)
 | 
			
		||||
{
 | 
			
		||||
    const int key_index = GImGui->IO.KeyMap[key];
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										1
									
								
								imgui.h
									
									
									
									
									
								
							
							
						
						
									
										1
									
								
								imgui.h
									
									
									
									
									
								
							@@ -457,6 +457,7 @@ namespace ImGui
 | 
			
		||||
    IMGUI_API void          SetItemAllowOverlap();                                              // allow last item to be overlapped by a subsequent item. sometimes useful with invisible buttons, selectables, etc. to catch unused area.
 | 
			
		||||
    IMGUI_API bool          IsWindowFocused(ImGuiFocusedFlags flags = 0);                       // is current window focused? or its root/child, depending on flags. see flags for options.
 | 
			
		||||
    IMGUI_API bool          IsWindowHovered(ImGuiHoveredFlags flags = 0);                       // is current window hovered (and typically: not blocked by a popup/modal)? see flags for options.
 | 
			
		||||
    IMGUI_API bool          IsAnyWindowFocused();
 | 
			
		||||
    IMGUI_API bool          IsAnyWindowHovered();                                               // is mouse hovering any visible window
 | 
			
		||||
    IMGUI_API bool          IsRectVisible(const ImVec2& size);                                  // test if rectangle (of given size, starting from cursor position) is visible / not clipped.
 | 
			
		||||
    IMGUI_API bool          IsRectVisible(const ImVec2& rect_min, const ImVec2& rect_max);      // test if rectangle (in screen space) is visible / not clipped. to perform coarse clipping on user's side.
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user