Crates.io | imgui-sdl2 |
lib.rs | imgui-sdl2 |
version | 0.15.3 |
source | src |
created_at | 2018-05-03 18:28:47.565907 |
updated_at | 2023-12-05 06:39:28.414723 |
description | SDL2 Input handling for imgui-rs |
homepage | https://github.com/michaelfairley/rust-imgui-sdl2 |
repository | https://github.com/michaelfairley/rust-imgui-sdl2 |
max_upload_size | |
id | 63621 |
size | 33,111 |
SDL2 Input handling for imgui-rs
let mut imgui_sdl2 = imgui_sdl2::ImguiSdl2::new(&mut imgui, &window);
imgui_sdl2.handle_event(&mut imgui, &event);
if imgui_sdl2.ignore_event(&event) { continue; }
prepare_frame
before calling imgui.frame()
.
imgui_sdl2.prepare_frame(imgui.io_mut(), &window, &event_pump.mouse_state());
prepare_render
immediately before your UI rendering code.
imgui_sdl2.prepare_render(&ui, &window);
Take a look at the example app to see it all in context.