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

@ -88,8 +88,8 @@ int main(int, char**)
{
// Poll and handle events (inputs, window resize, etc.)
// 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.
SDL_Event event;
while (SDL_PollEvent(&event))