mirror of
https://github.com/ocornut/imgui.git
synced 2025-02-02 20:47:23 +01:00
TestEngine: for consistency, title bar / window items are registered in _Menu layer.
This commit is contained in:
parent
13c4084362
commit
f31d53093b
@ -7391,9 +7391,12 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags)
|
|||||||
{
|
{
|
||||||
IM_ASSERT(window->IDStack.Size == 1);
|
IM_ASSERT(window->IDStack.Size == 1);
|
||||||
window->IDStack.Size = 0; // As window->IDStack[0] == window->ID here, make sure TestEngine doesn't erroneously see window as parent of itself.
|
window->IDStack.Size = 0; // As window->IDStack[0] == window->ID here, make sure TestEngine doesn't erroneously see window as parent of itself.
|
||||||
|
window->DC.NavLayerCurrent = ImGuiNavLayer_Menu;
|
||||||
IMGUI_TEST_ENGINE_ITEM_ADD(window->ID, window->Rect(), NULL);
|
IMGUI_TEST_ENGINE_ITEM_ADD(window->ID, window->Rect(), NULL);
|
||||||
IMGUI_TEST_ENGINE_ITEM_INFO(window->ID, window->Name, (g.HoveredWindow == window) ? ImGuiItemStatusFlags_HoveredRect : 0);
|
IMGUI_TEST_ENGINE_ITEM_INFO(window->ID, window->Name, (g.HoveredWindow == window) ? ImGuiItemStatusFlags_HoveredRect : 0);
|
||||||
window->IDStack.Size = 1;
|
window->IDStack.Size = 1;
|
||||||
|
window->DC.NavLayerCurrent = ImGuiNavLayer_Main;
|
||||||
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -7653,7 +7656,11 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags)
|
|||||||
// [Test Engine] Register title bar / tab with MoveId.
|
// [Test Engine] Register title bar / tab with MoveId.
|
||||||
#ifdef IMGUI_ENABLE_TEST_ENGINE
|
#ifdef IMGUI_ENABLE_TEST_ENGINE
|
||||||
if (!(window->Flags & ImGuiWindowFlags_NoTitleBar))
|
if (!(window->Flags & ImGuiWindowFlags_NoTitleBar))
|
||||||
|
{
|
||||||
|
window->DC.NavLayerCurrent = ImGuiNavLayer_Menu;
|
||||||
IMGUI_TEST_ENGINE_ITEM_ADD(g.LastItemData.ID, g.LastItemData.Rect, &g.LastItemData);
|
IMGUI_TEST_ENGINE_ITEM_ADD(g.LastItemData.ID, g.LastItemData.Rect, &g.LastItemData);
|
||||||
|
window->DC.NavLayerCurrent = ImGuiNavLayer_Main;
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user