imgui-sdl2
SDL2 Input handling for imgui-rs
Integration guide
- Construct it.
let mut imgui_sdl2 = new;
- At the top of your event handling loop, pass in the input events, and ignore the ones that imgui has captured.
imgui_sdl2.handle_event; if imgui_sdl2.ignore_event
- Call
prepare_frame
before callingimgui.frame()
.imgui_sdl2.prepare_frame;
- Call
prepare_render
immediately before your UI rendering code.imgui_sdl2.prepare_render;
Take a look at the example app to see it all in context.