Skip to content

Commit

Permalink
Add callback PostRenderDockableWindows
Browse files Browse the repository at this point in the history
  • Loading branch information
pthom committed May 26, 2024
1 parent f5c6f82 commit 571e728
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/hello_imgui/internal/backend_impls/abstract_runner.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -834,6 +834,9 @@ void AbstractRunner::RenderGui()

Theme_WindowGui(params.imGuiWindowParams.tweakedTheme);

if (params.callbacks.PostRenderDockableWindows)
params.callbacks.PostRenderDockableWindows();

DockingDetails::CloseWindowOrDock(params.imGuiWindowParams);
}

Expand Down
5 changes: 5 additions & 0 deletions src/hello_imgui/runner_callbacks.h
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,7 @@ struct RunnerCallbacks
// --------------- GUI Callbacks -------------------

// `ShowGui`: Fill it with a function that will add your widgets.
// (ShowGui will be called at each frame, before rendering the Dockable windows, if any)
VoidFunction ShowGui = EmptyVoidFunction();

// `ShowMenus`: Fill it with a function that will add ImGui menus by calling:
Expand Down Expand Up @@ -250,6 +251,10 @@ struct RunnerCallbacks
// on top of that content.
VoidFunction CustomBackground = EmptyVoidFunction();

// `PostRenderDockableWindows`: Fill it with a function that will be called
// after the dockable windows are rendered.
VoidFunction PostRenderDockableWindows = EmptyVoidFunction();

// `AnyBackendEventCallback`:
// Callbacks for events from a specific backend. _Only implemented for SDL.
// where the event will be of type 'SDL_Event *'_
Expand Down

0 comments on commit 571e728

Please sign in to comment.