mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-12 00:14:20 +00:00
Add a UserData pointer so that the callback functions can easily access user state.
Just in case a project has adverse reactions to adding globals or statics in their own code.
This commit is contained in:
parent
36212b9ad9
commit
c40dc84909
2 changed files with 2 additions and 0 deletions
|
|
@ -332,6 +332,7 @@ ImGuiIO::ImGuiIO()
|
|||
|
||||
// User functions
|
||||
RenderDrawListsFn = NULL;
|
||||
UserData = NULL;
|
||||
MemAllocFn = malloc;
|
||||
MemReallocFn = realloc;
|
||||
MemFreeFn = free;
|
||||
|
|
|
|||
1
imgui.h
1
imgui.h
|
|
@ -430,6 +430,7 @@ struct ImGuiIO
|
|||
// REQUIRED: rendering function.
|
||||
// See example code if you are unsure of how to implement this.
|
||||
void (*RenderDrawListsFn)(ImDrawList** const draw_lists, int count);
|
||||
void* UserData;
|
||||
|
||||
// Optional: access OS clipboard (default to use native Win32 clipboard on Windows, otherwise use a ImGui private clipboard)
|
||||
// Override to access OS clipboard on other architectures.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue