Skip to content

Commit

Permalink
tests: Fix popup screen captures
Browse files Browse the repository at this point in the history
Some popups like the keypad didn't get captured.

After debugging, I've narrowed it down to the
ImGuiCaptureFlags_StitchAll flag, which is about
capturing the whole scroll area content. Since the flag is unrelated
to popups, this seems like a bug in ImGuiTestEngine.

Signed-off-by: Sergio Martins <[email protected]>
  • Loading branch information
iamsergio committed Nov 5, 2024
1 parent dd50403 commit b992c80
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ui/test/ImGuiTestApp.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class ImGuiTestApp {
@param ref An ImGuiID or a char* path that identifies the widget to be captured. Captures the window by default
@param captureFlags See ImGui's ImGuiCaptureFlags_ enum
*/
static void captureScreenshot(ImGuiTestContext& ctx, ImGuiTestRef ref = "/", int captureFlags = ImGuiCaptureFlags_StitchAll | ImGuiCaptureFlags_HideMouseCursor | ImGuiCaptureFlags_IncludeTooltipsAndPopups | ImGuiCaptureFlags_IncludeOtherWindows);
static void captureScreenshot(ImGuiTestContext& ctx, ImGuiTestRef ref = "/", int captureFlags = ImGuiCaptureFlags_HideMouseCursor | ImGuiCaptureFlags_IncludeTooltipsAndPopups | ImGuiCaptureFlags_IncludeOtherWindows);

// Prints the existing window ids, for debugging purposes
static void printWindows();
Expand Down

0 comments on commit b992c80

Please sign in to comment.