pub fn new(font: &Font, matrix_binding: usize) -> Ui {
        Ui {
            style: Default::default(),

            font: CachedFont::from_font(font.clone()),
            shader: build_shader(matrix_binding),
            draw_data: Vec::with_capacity(500),
            draw_vbo: VertexBuffer::with_capacity(PrimitiveMode::Triangles, BufferUsage::DynamicDraw, 500),

            caret: Vec2::zero(),
            caret_start: Vec2::zero(),
            line_size: 0.0,
            line_dir: LineDir::Vertical,

            held: None,
            focused: None,
            freeze_caret: false,

            salt: String::new(),
            internal_fmt_string: String::new(),
            slider_map: HashMap::new(),
            textbox_map: HashMap::new(),

            caret_blink_time: 0.0,

            mouse_pos: Vec2::zero(),
            mouse_state: KeyState::Up,
            move_left: false, move_right: false,
            typed: String::new(),
        }
    }
/// Creates a new imediate mode gui system with the given font. Note that the font will be
/// copied internally, so you can pass a reference to a font you are using elsewhere in your
/// program.
///
/// `matrix_binding` specifies a uniform buffer binding index. A [`PrimitiveBuffer`] with
/// `BufferTarget::Uniform` with a projection matrix (Usually you would want a orthographic
/// matrix) stored at the first index has to be bound to this index using
/// [`PrimitiveBuffer::bind_base(matrix_binding)`].
///
/// [`PrimitiveBuffer`]: ../buffer/struct.PrimitiveBuffer.html
/// [`PrimitiveBuffer::bind_base(matrix_binding)`]: ../buffer/struct.PrimitiveBuffer.html#method.bind_base
Creates a new imediate mode gui system with the given font. Note that the font will be
copied internally, so you can pass a reference to a font you are using elsewhere in your
program.

`matrix_binding` specifies a uniform buffer binding index.


Creates a new imediate mode gui system with the given font . Note that the font will be copied internally so you can pass a reference to a font you are using elsewhere in your program . ` matrix_binding ` specifies a uniform buffer binding index .
pub fn new(font: &Font, matrix_binding: usize) -> Ui {
        Ui {
            style: Default::default(),
            font: CachedFont::from_font(font.clone()),
            shader: build_shader(matrix_binding),
            draw_data: Vec::with_capacity(500),
            draw_vbo: VertexBuffer::with_capacity(PrimitiveMode::Triangles, BufferUsage::DynamicDraw, 500),
            caret: Vec2::zero(),
            caret_start: Vec2::zero(),
            line_size: 0.0,
            line_dir: LineDir::Vertical,
            held: None,
            focused: None,
            freeze_caret: false,
            salt: String::new(),
            internal_fmt_string: String::new(),
            slider_map: HashMap::new(),
            textbox_map: HashMap::new(),
            caret_blink_time: 0.0,
            mouse_pos: Vec2::zero(),
            mouse_state: KeyState::Up,
            move_left: false, move_right: false,
            typed: String::new(),
        }
    }
pub fn new ( font : & Font , matrix_binding : usize ) -> Ui { Ui { style : Default :: default ( ) , font : CachedFont :: from_font ( font . clone ( ) ) , shader : build_shader ( matrix_binding ) , draw_data : Vec :: with_capacity ( 500 ) , draw_vbo : VertexBuffer :: with_capacity ( PrimitiveMode :: Triangles , BufferUsage :: DynamicDraw , 500 ) , caret : Vec2 :: zero ( ) , caret_start : Vec2 :: zero ( ) , line_size : 0.0 , line_dir : LineDir :: Vertical , held : None , focused : None , freeze_caret : false , salt : String :: new ( ) , internal_fmt_string : String :: new ( ) , slider_map : HashMap :: new ( ) , textbox_map : HashMap :: new ( ) , caret_blink_time : 0.0 , mouse_pos : Vec2 :: zero ( ) , mouse_state : KeyState :: Up , move_left : false , move_right : false , typed : String :: new ( ) , } }
Creates a new imediate mode gui system with the given font.
Creates a new imediate mode gui system with the given font .
font
&Font
matrix_binding
usize
font
&Font
matrix_binding
usize