mirror of
				https://github.com/Drezil/imgui.git
				synced 2025-11-04 15:11:05 +01:00 
			
		
		
		
	Minor tweaks
This commit is contained in:
		@@ -4072,7 +4072,7 @@ bool ImGui::Begin(const char* name, bool* p_open, const ImVec2& size_on_first_us
 | 
				
			|||||||
        if (window_pos_center)
 | 
					        if (window_pos_center)
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            // Center (any sort of window)
 | 
					            // Center (any sort of window)
 | 
				
			||||||
            SetWindowPos(ImMax(style.DisplaySafeAreaPadding, fullscreen_rect.GetCenter() - window->SizeFull * 0.5f));
 | 
					            SetWindowPos(window, ImMax(style.DisplaySafeAreaPadding, fullscreen_rect.GetCenter() - window->SizeFull * 0.5f), 0);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        else if (flags & ImGuiWindowFlags_ChildMenu)
 | 
					        else if (flags & ImGuiWindowFlags_ChildMenu)
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
@@ -4870,14 +4870,13 @@ static void SetWindowPos(ImGuiWindow* window, const ImVec2& pos, ImGuiSetCond co
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
void ImGui::SetWindowPos(const ImVec2& pos, ImGuiSetCond cond)
 | 
					void ImGui::SetWindowPos(const ImVec2& pos, ImGuiSetCond cond)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    ImGuiWindow* window = GetCurrentWindow();
 | 
					    ImGuiWindow* window = GetCurrentWindowRead();
 | 
				
			||||||
    SetWindowPos(window, pos, cond);
 | 
					    SetWindowPos(window, pos, cond);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void ImGui::SetWindowPos(const char* name, const ImVec2& pos, ImGuiSetCond cond)
 | 
					void ImGui::SetWindowPos(const char* name, const ImVec2& pos, ImGuiSetCond cond)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
    ImGuiWindow* window = FindWindowByName(name);
 | 
					    if (ImGuiWindow* window = FindWindowByName(name))
 | 
				
			||||||
    if (window)
 | 
					 | 
				
			||||||
        SetWindowPos(window, pos, cond);
 | 
					        SetWindowPos(window, pos, cond);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user