imgui-winit 0.1.2

A simple translation layer between winit and imgui
Documentation

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

// 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
}