[][src]Module imgui_ext::display

display(...) docs.

display(...) is used to display and format a field.

Optional fields

  • label override widget label.
  • display formatted text.

Example

#[derive(imgui_ext::Gui)]
struct Labels {
    #[imgui(display)]
    foo: f32,

    // Use inner fields to format the text.
    #[imgui(display(label = "Tuple", display = "({}, {}, {})", 0, 1, 2))]
    bar: (f32, bool, usize),

    // When display is the only annotation on a type, you may write it in this shorter form:
    #[imgui(label = "String param")]
    baz: String,
}

]result