Docking: Documenting an issue. Renamed member of ImGuiDockFamily.
This commit is contained in:
parent
6644f1ff64
commit
b96b1f2412
@ -11219,11 +11219,11 @@ static bool DockNodeIsDropAllowedOne(ImGuiWindow* payload, ImGuiWindow* host_win
|
||||
|
||||
ImGuiDockFamily* host_family = host_window->DockNodeAsHost ? &host_window->DockNodeAsHost->DockFamily : &host_window->DockFamily;
|
||||
ImGuiDockFamily* payload_family = &payload->DockFamily;
|
||||
if (host_family->ID != payload_family->ID)
|
||||
if (host_family->FamilyId != payload_family->FamilyId)
|
||||
{
|
||||
if (host_family->ID != 0 && host_family->CompatibleWithFamilyZero && payload_family->ID == 0)
|
||||
if (host_family->FamilyId != 0 && host_family->CompatibleWithFamilyZero && payload_family->FamilyId == 0)
|
||||
return true;
|
||||
if (payload_family->ID != 0 && payload_family->CompatibleWithFamilyZero && host_family->ID == 0)
|
||||
if (payload_family->FamilyId != 0 && payload_family->CompatibleWithFamilyZero && host_family->FamilyId == 0)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
@ -13068,7 +13068,7 @@ static void SettingsHandlerWindow_WriteAll(ImGuiContext* imgui_ctx, ImGuiSetting
|
||||
settings->ViewportPos = window->ViewportPos;
|
||||
IM_ASSERT(window->DockNode == NULL || window->DockNode->ID == window->DockId);
|
||||
settings->DockId = window->DockId;
|
||||
settings->DockFamilyId = window->DockFamily.ID;
|
||||
settings->DockFamilyId = window->DockFamily.FamilyId;
|
||||
settings->DockOrder = window->DockOrder;
|
||||
settings->Collapsed = window->Collapsed;
|
||||
}
|
||||
|
6
imgui.h
6
imgui.h
@ -1446,11 +1446,11 @@ struct ImGuiPayload
|
||||
// [BETA] For SetNextWindowDockFamily() and DockSpace() function
|
||||
struct ImGuiDockFamily
|
||||
{
|
||||
ImGuiID ID; // 0 = unaffiliated
|
||||
ImGuiID FamilyId; // 0 = unaffiliated
|
||||
bool CompatibleWithFamilyZero; // true = can be docked/merged with an unaffiliated window
|
||||
|
||||
ImGuiDockFamily() { ID = 0; CompatibleWithFamilyZero = true; }
|
||||
ImGuiDockFamily(ImGuiID id, bool compatible_with_family_zero = true) { ID = id; CompatibleWithFamilyZero = compatible_with_family_zero; }
|
||||
ImGuiDockFamily() { FamilyId = 0; CompatibleWithFamilyZero = true; }
|
||||
ImGuiDockFamily(ImGuiID family_id, bool compatible_with_family_zero = true) { FamilyId = family_id; CompatibleWithFamilyZero = compatible_with_family_zero; }
|
||||
};
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
@ -1539,6 +1539,8 @@ static void ShowDemoWindowWidgets()
|
||||
ImGui::Checkbox("Hovered/Active tests after Begin() for title bar testing", &test_window);
|
||||
if (test_window)
|
||||
{
|
||||
// FIXME-DOCK: This window cannot be docked within the ImGui Demo window, this will cause a feedback loop and get them stuck.
|
||||
// Could we fix this through an ImGuiDockFamily feature? Or an API call to tag our parent as "don't skip items"?
|
||||
ImGui::Begin("Title bar Hovered/Active tests", &test_window);
|
||||
if (ImGui::BeginPopupContextItem()) // <-- This is using IsItemHovered()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user