Skip to content

Commit

Permalink
Rename CallPostInit & CallBeforeExit
Browse files Browse the repository at this point in the history
  • Loading branch information
pthom committed Jan 12, 2024
1 parent e48218a commit 6af0590
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions src/hello_imgui/doc_params.md
Original file line number Diff line number Diff line change
Expand Up @@ -288,10 +288,10 @@ struct RunnerCallbacks
// you should use this function to do so.
VoidFunction PostInit = EmptyVoidFunction();
// `EnqueuePostInit`: Add a function that will be called once after OpenGL
// `CallPostInit`: Add a function that will be called once after OpenGL
// and ImGui are inited, but before the backend callback are initialized.
// (this will modify the `PostInit` callback by appending the new callback (using `SequenceFunctions`)
void EnqueuePostInit(const VoidFunction& callback);
void CallPostInit(const VoidFunction& callback);
// `LoadAdditionalFonts`: default=_LoadDefaultFont_WithFontAwesome*.
// A function that is called once, when fonts are ready to be loaded.
Expand Down Expand Up @@ -327,7 +327,7 @@ struct RunnerCallbacks
// `EnqueueBeforeExit`: Add a function that will be called once before exiting
// (when OpenGL and ImGui are still inited)
// (this will modify the `BeforeExit` callback by appending the new callback (using `SequenceFunctions`)
void EnqueueBeforeExit(const VoidFunction& callback);
void CallBeforeExit(const VoidFunction& callback);
// `BeforeExit_PostCleanup`: You can here add a function that will be called once
// before exiting (after OpenGL and ImGui have been stopped)
Expand Down
4 changes: 2 additions & 2 deletions src/hello_imgui/runner_callbacks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@ namespace HelloImGui
edgesToolbars[edgeToolbarType] = edgeToolbar;
}

void RunnerCallbacks::EnqueueBeforeExit(const HelloImGui::VoidFunction &callback)
void RunnerCallbacks::CallBeforeExit(const VoidFunction& callback)
{
BeforeExit = SequenceFunctions(BeforeExit, callback);
}

void RunnerCallbacks::EnqueuePostInit(const HelloImGui::VoidFunction &callback)
void RunnerCallbacks::CallPostInit(const VoidFunction& callback)
{
PostInit = SequenceFunctions(PostInit, callback);
}
Expand Down
6 changes: 3 additions & 3 deletions src/hello_imgui/runner_callbacks.h
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,10 @@ struct RunnerCallbacks
// you should use this function to do so.
VoidFunction PostInit = EmptyVoidFunction();

// `EnqueuePostInit`: Add a function that will be called once after OpenGL
// `CallPostInit`: Add a function that will be called once after OpenGL
// and ImGui are inited, but before the backend callback are initialized.
// (this will modify the `PostInit` callback by appending the new callback (using `SequenceFunctions`)
void EnqueuePostInit(const VoidFunction& callback);
void CallPostInit(const VoidFunction& callback);

// `LoadAdditionalFonts`: default=_LoadDefaultFont_WithFontAwesome*.
// A function that is called once, when fonts are ready to be loaded.
Expand Down Expand Up @@ -186,7 +186,7 @@ struct RunnerCallbacks
// `EnqueueBeforeExit`: Add a function that will be called once before exiting
// (when OpenGL and ImGui are still inited)
// (this will modify the `BeforeExit` callback by appending the new callback (using `SequenceFunctions`)
void EnqueueBeforeExit(const VoidFunction& callback);
void CallBeforeExit(const VoidFunction& callback);

// `BeforeExit_PostCleanup`: You can here add a function that will be called once
// before exiting (after OpenGL and ImGui have been stopped)
Expand Down

0 comments on commit 6af0590

Please sign in to comment.