Examples: GLFW: User previously installed GLFW callbacks are now saved and chain-called by the default callbacks. (#1759)

This commit is contained in:
omar
2018-11-08 16:24:41 +01:00
parent 9d155c73bc
commit 772354377b
6 changed files with 41 additions and 21 deletions

View File

@ -25,10 +25,8 @@ IMGUI_IMPL_API bool ImGui_ImplGlfw_InitForVulkan(GLFWwindow* window, bool in
IMGUI_IMPL_API void ImGui_ImplGlfw_Shutdown();
IMGUI_IMPL_API void ImGui_ImplGlfw_NewFrame();
// GLFW callbacks are installed by default if you call the InitXXX function with 'install_callbacks=true'.
// If you already have GLFW callbacks installed by your application, call the InitXXX function with install_callbacks=false,
// then call the functions yourselves from your own GLFW callbacks.
// You may also handle inputs yourself and use those as a reference.
// InitXXX function with 'install_callbacks=true': install GLFW callbacks. They will call user's previously installed callbacks, if any.
// InitXXX function with 'install_callbacks=false': do not install GLFW callbacks. You will need to call them yourself from your own GLFW callbacks.
IMGUI_IMPL_API void ImGui_ImplGlfw_MouseButtonCallback(GLFWwindow* window, int button, int action, int mods);
IMGUI_IMPL_API void ImGui_ImplGlfw_ScrollCallback(GLFWwindow* window, double xoffset, double yoffset);
IMGUI_IMPL_API void ImGui_ImplGlfw_KeyCallback(GLFWwindow* window, int key, int scancode, int action, int mods);