Backends, Examples: Add comments about using WndProc handler and WantCaptureXXX flags. (#5061)

+ update README.
This commit is contained in:
ocornut
2022-02-28 20:50:58 +01:00
parent 54fb051e52
commit 1e18da5c38
22 changed files with 60 additions and 53 deletions

View File

@ -94,8 +94,8 @@ void glut_display_func()
}
// You can read the io.WantCaptureMouse, io.WantCaptureKeyboard flags to tell if dear imgui wants to use your inputs.
// - When io.WantCaptureMouse is true, do not dispatch mouse input data to your main application.
// - When io.WantCaptureKeyboard is true, do not dispatch keyboard input data to your main application.
// - When io.WantCaptureMouse is true, do not dispatch mouse input data to your main application, or clear/overwrite your copy of the mouse data.
// - When io.WantCaptureKeyboard is true, do not dispatch keyboard input data to your main application, or clear/overwrite your copy of the keyboard data.
// Generally you may always pass all inputs to dear imgui, and hide them from your application based on those two flags.
int main(int argc, char** argv)
@ -125,6 +125,7 @@ int main(int argc, char** argv)
//ImGui::StyleColorsClassic();
// Setup Platform/Renderer backends
// FIXME: Consider reworking this example to install our own GLUT funcs + forward calls ImGui_ImplGLUT_XXX ones, instead of using ImGui_ImplGLUT_InstallFuncs().
ImGui_ImplGLUT_Init();
ImGui_ImplGLUT_InstallFuncs();
ImGui_ImplOpenGL2_Init();