kitgit

tirbofish/dropbear

main / crates / kino-ui

8a5b9a9
Unverified
666 commits
  • src perf: updated dependencies style: ran `cargo fmt` 2026-03-28 09:33 Download
  • Cargo.toml fix: terrible performance within the GameEditor fix: saving didnt work properly and hiked up CPU usage to 100%. fix: attempted to make ResourceReferenceType::Bytes be Arc<[u8]> for cloning (memory opt). 2026-03-09 06:50
  • README.md wip: ui editor refactor: prepared kino_ui for serialization refactor: integrated kino_ui WidgetTree into the components and redback-runtime. feature: ability to switch between UI and editor possible now feature: implemented categorisation to adding a component feature: scene settings related to overlaying. 2026-03-07 02:49

kino-ui

Kino is a type of resin that is made by eucalyptus trees, and the name of the UI library.

Built with wgpu and winit, this UI library is inspired by the ui crate wick3dr0se/egor and uses Assembly-like instructions to render different components, including standard and containerised widgets. It uses a FIFO (first in, first out) architecture for rendering.

Example

pub fn init() {
    let renderer = KinoWGPURenderer::new(/*yabba dabba doo*/);
    let windowing = KinoWinitWindowing::new(window.clone());
    
    // keep this with you this is important. the rest are owned by KinoState
    let kino = KinoState::new(renderer, windowing);
}

pub fn update(kino: &mut KinoState) {
    // creating new widget
    let new_rect = kino.add_widget(Box::new(
        Rectangle::new("red patch".into())
            .with(&Rect::new([50.0, 100.0].into(), [128.0, 100.0].into()))
            .colour([255.0, 0.0, 0.0, 255.0]).into()
    ));

    // polling to build the widget tree
    kino.poll();

    // checking input response
    if kino.response(new_rect).clicked {
        println!("I have been clicked!");
    }
}

pub fn render(kino: &mut KinoState) {
    // ...
    
    // generally the last thing to render on your viewport if you want
    // an overlay
    kino.render(/**/);
    
    // ...
}

Features

  • ser: allows for serialization of widgets with serde.