Simple UI library written in Rust (backup/mirror) https://github.com/griffi-gh/hUI
Go to file
2024-05-08 03:21:49 +02:00
.assets wait it looks wrong 2024-02-28 17:01:43 +01:00
.devcontainer Update devcontainer.json 2024-03-26 00:40:54 +01:00
.vscode disable word wrap 2024-03-25 14:26:30 +01:00
hui remove unused thingy 2024-05-08 01:49:48 +02:00
hui-derive wip state stuff 2024-03-29 13:44:56 +01:00
hui-examples add support for winit 0.30 2024-05-04 21:43:03 +02:00
hui-glium bump master version to 0.1.0-alpha.5 2024-03-25 18:41:44 +01:00
hui-wgpu k it kinda wokrs 2024-05-08 03:21:49 +02:00
hui-winit add support for winit 0.30 2024-05-04 21:43:03 +02:00
.gitignore Initial commit 2024-02-17 21:43:46 +01:00
.markdownlint.jsonc update readme 2024-03-25 14:26:20 +01:00
Cargo.toml create hui-wgpu 2024-05-05 01:14:06 +02:00
LICENSE.txt Initial commit 2024-02-17 21:43:46 +01:00
README.md upd readme to mention wgpu 2024-05-08 01:50:02 +02:00

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.34"
hui-winit = <master>
winit = "0.30" or winit = "0.29"
hui-wgpu = <master>
wgpu = "0.20"
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.75