mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-16 00:54:19 +00:00
Tests: Reworking hook prototypes for imgui-test to be faster and multi-context friendly.
This commit is contained in:
parent
c2db7f63bd
commit
b33977bc15
3 changed files with 12 additions and 11 deletions
|
|
@ -2697,7 +2697,8 @@ bool ImGui::ItemAdd(const ImRect& bb, ImGuiID id, const ImRect* nav_bb_arg)
|
|||
window->DC.LastItemStatusFlags = ImGuiItemStatusFlags_None;
|
||||
|
||||
#ifdef IMGUI_ENABLE_TEST_ENGINE
|
||||
ImGuiTestEngineHook_ItemAdd(bb, id);
|
||||
if (id != 0)
|
||||
ImGuiTestEngineHook_ItemAdd(&g, bb, id);
|
||||
#endif
|
||||
|
||||
// Clipping test
|
||||
|
|
@ -3251,7 +3252,7 @@ void ImGui::NewFrame()
|
|||
ImGuiContext& g = *GImGui;
|
||||
|
||||
#ifdef IMGUI_ENABLE_TEST_ENGINE
|
||||
ImGuiTestEngineHook_PreNewFrame();
|
||||
ImGuiTestEngineHook_PreNewFrame(&g);
|
||||
#endif
|
||||
|
||||
// Check user data
|
||||
|
|
@ -3427,7 +3428,7 @@ void ImGui::NewFrame()
|
|||
g.FrameScopePushedImplicitWindow = true;
|
||||
|
||||
#ifdef IMGUI_ENABLE_TEST_ENGINE
|
||||
ImGuiTestEngineHook_PostNewFrame();
|
||||
ImGuiTestEngineHook_PostNewFrame(&g);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue