|
|
@@ -1112,7 +1112,7 @@ ImGuiIO::ImGuiIO()
|
|
|
{
|
|
|
// Most fields are initialized with zero
|
|
|
memset(this, 0, sizeof(*this));
|
|
|
- IM_ASSERT(IM_ARRAYSIZE(ImGuiIO::MouseDown) == ImGuiMouseButton_COUNT && IM_ARRAYSIZE(ImGuiIO::MouseClicked) == ImGuiMouseButton_COUNT); // Our pre-C++11 IM_STATIC_ASSERT() macros triggers warning on modern compilers so we don't use it here.
|
|
|
+ IM_STATIC_ASSERT(IM_ARRAYSIZE(ImGuiIO::MouseDown) == ImGuiMouseButton_COUNT && IM_ARRAYSIZE(ImGuiIO::MouseClicked) == ImGuiMouseButton_COUNT);
|
|
|
|
|
|
// Settings
|
|
|
ConfigFlags = ImGuiConfigFlags_None;
|
|
|
@@ -6308,6 +6308,18 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags)
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ // [Test Engine] Register whole window in the item system
|
|
|
+#ifdef IMGUI_ENABLE_TEST_ENGINE
|
|
|
+ if (g.TestEngineHookItems)
|
|
|
+ {
|
|
|
+ IM_ASSERT(window->IDStack.Size == 1);
|
|
|
+ window->IDStack.Size = 0;
|
|
|
+ IMGUI_TEST_ENGINE_ITEM_ADD(window->Rect(), window->ID);
|
|
|
+ IMGUI_TEST_ENGINE_ITEM_INFO(window->ID, window->Name, (g.HoveredWindow == window) ? ImGuiItemStatusFlags_HoveredRect : 0);
|
|
|
+ window->IDStack.Size = 1;
|
|
|
+ }
|
|
|
+#endif
|
|
|
+
|
|
|
// Handle manual resize: Resize Grips, Borders, Gamepad
|
|
|
int border_held = -1;
|
|
|
ImU32 resize_grip_col[4] = {};
|
|
|
@@ -6529,10 +6541,9 @@ bool ImGui::Begin(const char* name, bool* p_open, ImGuiWindowFlags flags)
|
|
|
// This is useful to allow creating context menus on title bar only, etc.
|
|
|
SetLastItemData(window->MoveId, g.CurrentItemFlags, IsMouseHoveringRect(title_bar_rect.Min, title_bar_rect.Max, false) ? ImGuiItemStatusFlags_HoveredRect : 0, title_bar_rect);
|
|
|
|
|
|
-#ifdef IMGUI_ENABLE_TEST_ENGINE
|
|
|
+ // [Test Engine] Register title bar / tab
|
|
|
if (!(window->Flags & ImGuiWindowFlags_NoTitleBar))
|
|
|
IMGUI_TEST_ENGINE_ITEM_ADD(g.LastItemData.Rect, g.LastItemData.ID);
|
|
|
-#endif
|
|
|
}
|
|
|
else
|
|
|
{
|