mirror of
				https://github.com/Drezil/imgui.git
				synced 2025-10-31 13:11:05 +01:00 
			
		
		
		
	Make it possible to use SetNextWindowPos() on a child window. Useful internally.
This commit is contained in:
		| @@ -4293,7 +4293,10 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags) | ||||
|         window->SizeFull = CalcSizeFullWithConstraint(window, window->SizeFull); | ||||
|         window->Size = window->Collapsed ? window->TitleBarRect().GetSize() : window->SizeFull; | ||||
|         if ((flags & ImGuiWindowFlags_ChildWindow) && !(flags & ImGuiWindowFlags_Popup)) | ||||
|         { | ||||
|             IM_ASSERT(window_size_set_by_api); // Submitted by BeginChild() | ||||
|             window->Size = window->SizeFull; | ||||
|         } | ||||
|  | ||||
|         // SCROLLBAR STATUS | ||||
|  | ||||
| @@ -4316,11 +4319,8 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags) | ||||
|             window->OrderWithinParent = parent_window->DC.ChildWindows.Size; | ||||
|             parent_window->DC.ChildWindows.push_back(window); | ||||
|         } | ||||
|         if ((flags & ImGuiWindowFlags_ChildWindow) && !(flags & ImGuiWindowFlags_Popup)) | ||||
|         { | ||||
|             IM_ASSERT(window_size_set_by_api); // Submitted by BeginChild() | ||||
|         if ((flags & ImGuiWindowFlags_ChildWindow) && !(flags & ImGuiWindowFlags_Popup) && !window_pos_set_by_api) | ||||
|             window->Pos = window->PosFloat = parent_window->DC.CursorPos; | ||||
|         } | ||||
|  | ||||
|         const bool window_pos_with_pivot = (window->SetWindowPosVal.x != FLT_MAX && window->HiddenFrames == 0); | ||||
|         if (window_pos_with_pivot) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user