mirror of
				https://github.com/Drezil/imgui.git
				synced 2025-10-31 13:11:05 +01:00 
			
		
		
		
	PushID()/PopID() to not need to mark parent window as Accessed (needlessly waking up the root "Debug" window) (#747)
This commit is contained in:
		
							
								
								
									
										10
									
								
								imgui.cpp
									
									
									
									
									
								
							
							
						
						
									
										10
									
								
								imgui.cpp
									
									
									
									
									
								
							| @@ -6185,32 +6185,32 @@ void ImGui::SetNextTreeNodeOpen(bool is_open, ImGuiCond cond) | |||||||
|  |  | ||||||
| void ImGui::PushID(const char* str_id) | void ImGui::PushID(const char* str_id) | ||||||
| { | { | ||||||
|     ImGuiWindow* window = GetCurrentWindow(); |     ImGuiWindow* window = GetCurrentWindowRead(); | ||||||
|     window->IDStack.push_back(window->GetID(str_id)); |     window->IDStack.push_back(window->GetID(str_id)); | ||||||
| } | } | ||||||
|  |  | ||||||
| void ImGui::PushID(const char* str_id_begin, const char* str_id_end) | void ImGui::PushID(const char* str_id_begin, const char* str_id_end) | ||||||
| { | { | ||||||
|     ImGuiWindow* window = GetCurrentWindow(); |     ImGuiWindow* window = GetCurrentWindowRead(); | ||||||
|     window->IDStack.push_back(window->GetID(str_id_begin, str_id_end)); |     window->IDStack.push_back(window->GetID(str_id_begin, str_id_end)); | ||||||
| } | } | ||||||
|  |  | ||||||
| void ImGui::PushID(const void* ptr_id) | void ImGui::PushID(const void* ptr_id) | ||||||
| { | { | ||||||
|     ImGuiWindow* window = GetCurrentWindow(); |     ImGuiWindow* window = GetCurrentWindowRead(); | ||||||
|     window->IDStack.push_back(window->GetID(ptr_id)); |     window->IDStack.push_back(window->GetID(ptr_id)); | ||||||
| } | } | ||||||
|  |  | ||||||
| void ImGui::PushID(int int_id) | void ImGui::PushID(int int_id) | ||||||
| { | { | ||||||
|     const void* ptr_id = (void*)(intptr_t)int_id; |     const void* ptr_id = (void*)(intptr_t)int_id; | ||||||
|     ImGuiWindow* window = GetCurrentWindow(); |     ImGuiWindow* window = GetCurrentWindowRead(); | ||||||
|     window->IDStack.push_back(window->GetID(ptr_id)); |     window->IDStack.push_back(window->GetID(ptr_id)); | ||||||
| } | } | ||||||
|  |  | ||||||
| void ImGui::PopID() | void ImGui::PopID() | ||||||
| { | { | ||||||
|     ImGuiWindow* window = GetCurrentWindow(); |     ImGuiWindow* window = GetCurrentWindowRead(); | ||||||
|     window->IDStack.pop_back(); |     window->IDStack.pop_back(); | ||||||
| } | } | ||||||
|  |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user