mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-04 12:08:47 +02:00
Tests: Changed prototype of ImGuiTestEngineHook_ItemAdd to match functions called in same spot. Made ButtonBehavior submit fallback item info if ItemAdd() was not called (for resize grips, resize borders, scrollbar, columns, etc.)
This commit is contained in:
@ -396,6 +396,11 @@ bool ImGui::ButtonBehavior(const ImRect& bb, ImGuiID id, bool* out_hovered, bool
|
||||
if ((flags & ImGuiButtonFlags_FlattenChildren) && g.HoveredRootWindow == window)
|
||||
g.HoveredWindow = window;
|
||||
|
||||
#ifdef IMGUI_ENABLE_TEST_ENGINE
|
||||
if (window->DC.LastItemId != id)
|
||||
ImGuiTestEngineHook_ItemAdd(bb, id);
|
||||
#endif
|
||||
|
||||
bool pressed = false;
|
||||
bool hovered = ItemHoverable(bb, id);
|
||||
|
||||
|
Reference in New Issue
Block a user