[][src]Module imgui_ext::nested

nested(...) docs (used to build nested UIs).

Types that #[derive(ImGuiExt)] can be nested.

Optional fields

  • catch currently unimplemented (#4)

Example

use imgui::{ImString, ImGuiInputTextFlags};
use imgui_ext::ImGuiExt;

#[derive(ImGuiExt)]
struct Form {
    #[imgui(text)]
    user: ImString,
    #[imgui(text(flags = "passwd_flags"))]
    passwd: ImString,
    #[imgui(button(label = "Login"))]
    _btn: (),
}

fn passwd_flags() -> ImGuiInputTextFlags {
    ImGuiInputTextFlags::Password
}

#[derive(ImGuiExt)]
struct Example {
    #[imgui(nested, separator)]
    login_form: Form,
    #[imgui(checkbox(label = "Remember login?"))]
    remember: bool,
}

Result