# imgui-winit

This is a simple translation layer between winit and imgui. It exists because I found myself repeating a bunch of specific boilerplate every time I used imgui, in order to translate winit events into imgui. This crate contains functionality for forwarding winit events to imgui, as well as keeping track of frame deltas and window size to pass to imgui.

# Example usage

```rust
// Initialization
let mut imgui_winit = ImGuiWinit::new(&mut imgui);

loop {
    // In the main loop
    event_loop.poll_events(|event| {
        imgui_winit.handle_event(&mut imgui, &event);
        // Other event handling
    });

    let ui = imgui_winit.frame(&mut imgui, &window);
    // Draw ui
}
```
