[][src]Module imgui_ext::input

input(...) docs.

(Text input has its own module: text)

Optional fields

  • label
  • step
  • step_fast
  • flags Name of a local function that returns the input flags.
  • catch

Example

The input trait is implemented for numeric types (f32 and i32) and their corresponding array types of up to 4 elements.

use imgui_ext::ImGuiExt;

#[derive(ImGuiExt)]
struct Example {
    #[imgui(input)]
    input_0: f32,

    #[imgui(input)]
    input_1: [f32; 2],

    #[imgui(input(step = 4, step_fast = 42))]
    input_2: i32,
}

Result

result

Input flags

You can specify a local function from where to load any input flags:

use imgui_ext::ImGuiExt;
use imgui::ImGuiInputTextFlags;

#[derive(ImGuiExt)]
struct Example {
    #[imgui(input(flags = "my_flags"))]
    n: f32,
}

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

Structs

InputParams

Traits

Input