[−][src]Function imgui_ext::imgui_ext
pub fn imgui_ext<U: ImGuiExt>(ui: &Ui, ext: &mut U) -> U::Events
Render imgui UI and collect all the events
ⓘThis example is not tested
#[derive(ImGuiExt)] struct Example { #[derive(checkbox(catch = "click"))] check_box: bool, } // initialize imgui and example... let events = imgui_ext(ui, &mut example); if events.click { println!("New value: {}", example.check_box); }
Optionally you can call an extension method on the ui directly by using the UiExt
trait.
ⓘThis example is not tested
// imports the UiExt trait use imgui_ext::prelude::*; // initialize ui and example... let events = ui.imgui_ext(&mut example); if events.click { // ... }