mirror of
https://github.com/Drezil/imgui.git
synced 2025-04-14 07:04:00 +00:00
Made the ImGuiWindowFlags_NoMove flag inherited from parent to child, so in a setup with RootWindow (no flag) -> Child (NoMove flag) -> SubChild (no flag) user won't be able to move the root window by clicking on SubChild. (#1381)
This commit is contained in:
parent
3b485cda51
commit
e6f06627e9
@ -3785,6 +3785,7 @@ static bool BeginChildEx(const char* name, ImGuiID id, const ImVec2& size_arg, b
|
|||||||
{
|
{
|
||||||
ImGuiWindow* parent_window = ImGui::GetCurrentWindow();
|
ImGuiWindow* parent_window = ImGui::GetCurrentWindow();
|
||||||
ImGuiWindowFlags flags = ImGuiWindowFlags_NoTitleBar|ImGuiWindowFlags_NoResize|ImGuiWindowFlags_NoSavedSettings|ImGuiWindowFlags_ChildWindow;
|
ImGuiWindowFlags flags = ImGuiWindowFlags_NoTitleBar|ImGuiWindowFlags_NoResize|ImGuiWindowFlags_NoSavedSettings|ImGuiWindowFlags_ChildWindow;
|
||||||
|
flags |= (parent_window->Flags & ImGuiWindowFlags_NoMove); // Inherit the NoMove flag
|
||||||
|
|
||||||
const ImVec2 content_avail = ImGui::GetContentRegionAvail();
|
const ImVec2 content_avail = ImGui::GetContentRegionAvail();
|
||||||
ImVec2 size = ImFloor(size_arg);
|
ImVec2 size = ImFloor(size_arg);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user