mirror of
				https://github.com/ocornut/imgui.git
				synced 2025-11-04 01:34:32 +00:00 
			
		
		
		
	Refactor moving ID stack functions to their own section.
This commit is contained in:
		
							
								
								
									
										30
									
								
								imgui.cpp
									
									
									
									
									
								
							
							
						
						
									
										30
									
								
								imgui.cpp
									
									
									
									
									
								
							@@ -77,6 +77,7 @@ CODE
 | 
			
		||||
// [SECTION] RENDER HELPERS
 | 
			
		||||
// [SECTION] INITIALIZATION, SHUTDOWN
 | 
			
		||||
// [SECTION] MAIN CODE (most of the code! lots of stuff, needs tidying up!)
 | 
			
		||||
// [SECTION] ID STACK
 | 
			
		||||
// [SECTION] INPUTS
 | 
			
		||||
// [SECTION] ERROR CHECKING
 | 
			
		||||
// [SECTION] ITEM SUBMISSION
 | 
			
		||||
@@ -7983,6 +7984,22 @@ ImGuiStorage* ImGui::GetStateStorage()
 | 
			
		||||
    return window->DC.StateStorage;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
bool ImGui::IsRectVisible(const ImVec2& size)
 | 
			
		||||
{
 | 
			
		||||
    ImGuiWindow* window = GImGui->CurrentWindow;
 | 
			
		||||
    return window->ClipRect.Overlaps(ImRect(window->DC.CursorPos, window->DC.CursorPos + size));
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
bool ImGui::IsRectVisible(const ImVec2& rect_min, const ImVec2& rect_max)
 | 
			
		||||
{
 | 
			
		||||
    ImGuiWindow* window = GImGui->CurrentWindow;
 | 
			
		||||
    return window->ClipRect.Overlaps(ImRect(rect_min, rect_max));
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
//-----------------------------------------------------------------------------
 | 
			
		||||
// [SECTION] ID STACK
 | 
			
		||||
//-----------------------------------------------------------------------------
 | 
			
		||||
 | 
			
		||||
void ImGui::PushID(const char* str_id)
 | 
			
		||||
{
 | 
			
		||||
    ImGuiContext& g = *GImGui;
 | 
			
		||||
@@ -8071,19 +8088,6 @@ ImGuiID ImGui::GetID(const void* ptr_id)
 | 
			
		||||
    return window->GetID(ptr_id);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
bool ImGui::IsRectVisible(const ImVec2& size)
 | 
			
		||||
{
 | 
			
		||||
    ImGuiWindow* window = GImGui->CurrentWindow;
 | 
			
		||||
    return window->ClipRect.Overlaps(ImRect(window->DC.CursorPos, window->DC.CursorPos + size));
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
bool ImGui::IsRectVisible(const ImVec2& rect_min, const ImVec2& rect_max)
 | 
			
		||||
{
 | 
			
		||||
    ImGuiWindow* window = GImGui->CurrentWindow;
 | 
			
		||||
    return window->ClipRect.Overlaps(ImRect(rect_min, rect_max));
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
//-----------------------------------------------------------------------------
 | 
			
		||||
// [SECTION] INPUTS
 | 
			
		||||
//-----------------------------------------------------------------------------
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user