5 releases

new 0.1.0-alpha.5 Dec 11, 2024
0.1.0-alpha.4 Mar 25, 2024
0.1.0-alpha.3 Feb 20, 2024
0.0.2 Feb 17, 2024

#157 in Images

Download history 10/week @ 2024-09-23 3/week @ 2024-09-30 1/week @ 2024-11-18 155/week @ 2024-12-09

156 downloads per month
Used in 3 crates

GPL-3.0-or-later

235KB
3.5K SLoC

logo

hUI

Simple UI library for games and other interactive applications crates.io
license (Formerly kubi-ui)


example: mom_downloader example: align_test

Example

code result
Container::default()
  .with_size(size!(100%, 50%))
  .with_align(Alignment::Center)
  .with_padding(5.)
  .with_gap(10.)
  .with_background(rect_frame! {
    color: (0.5, 0.5, 0.5, 1.),
    corner_radius: 10.,
  })
  .with_children(|ui| {
    Text::default()
      .with_text("Hello, world")
      .with_text_size(100)
      .with_color(color::BLACK)
      .add_child(ui);
    Container::default()
      .with_padding((10., 20.))
      .with_background(rect_frame! {
        color: color::DARK_RED,
        corner_radius: (2.5, 30., 2.5, 2.5),
      })
      .with_children(|ui| {
        Text::default()
          .with_text("Lorem ipsum dolor sit amet, consectetur adipiscing elit.")
          .with_text_size(24)
          .add_child(ui);
      })
      .add_child(ui);
  })
  .add_root(ui, size);

Backends

Latest stable release:  crates.io

hui glium (render) winit (platform) wgpu (render)
master hui-glium = <master>
glium = "0.36"
hui-winit = <master>
winit = "0.30"
hui-wgpu = <master>
wgpu = "23"
0.1.0-alpha.5 hui-glium = <master>
glium = "0.36"
hui-winit = <master>
winit = "0.30"
hui-wgpu = <master>
wgpu = "23"
0.1.0-alpha.4 hui-glium = "0.1.0-alpha.4"
glium = "0.34"
hui-winit = "0.1.0-alpha.4"
winit = "0.29"
N/A
0.1.0-alpha.3 hui-glium = "0.1.0-alpha.3"
glium = "0.34"
N/A
0.1.0-alpha.2 hui-glium = "0.1.0-alpha.2"
glium = "0.34"
N/A
0.1.0-alpha.1 hui-glium = "0.1.0-alpha.1"
glium = "0.34"
N/A

MSRV

1.80 (or latest stable at the time of the last major release)
bumps to MSRV are considered a breaking change

Dependencies

~10MB
~232K SLoC