#189·nuklear

Differentiating between events Nuklear want to consume, and events to sent to app

Author: samratCreated Aug 1, 2016Updated Oct 29, 2019
Labelsenhancement

Currently my code to handle events looks like this:

    nk_input_begin(ctx);
    if (SDL_PollEvent(&window_event)) {
      if (window_event.type == SDL_QUIT) break;
      nk_sdl_handle_event(&window_event);
      handle_event(&pplane_state, &window_event);
    }
    nk_input_end(ctx);

The problem is that the events go to both Nuklear and to my app. What I want to do is first pass it to Nuklear, then check if it is something Nuklear uses, then if it is not, pass it to my own handle_event function. How do I do that?

In "dear imgui" it seems it sets the wantCaptureFlags. Is there anything equivalent in Nuklear?