yog-ui 0.1.0

Yog UI framework — flexbox layout engine + GPU rendering via yog-gfx
Documentation
  • Coverage
  • 23.38%
    18 out of 77 items documented0 out of 29 items with examples
  • Size
  • Source code size: 13.15 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 801.33 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 3s Average build duration of successful builds.
  • all releases: 2s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • F000NKKK

yog-ui — retained-mode UI framework for Yog mods.

Flexbox-inspired layout engine + GPU rendering via [yog-gfx]. Use for custom inventories, guide books, tooltips, HUD overlays.

Quick start

use yog_ui::{UiRoot, widget, Align, FlexDir, Units};

let ui = UiRoot::new("mymod:main_menu")
    .style(|s| s.bg(0x88332211).padding(8.0, 8.0, 8.0, 8.0))
    .child(
        widget::panel(FlexDir::Column).gap(4.0)
            .child(widget::label("Hello, World!").color(0xFF_DDAA00))
            .child(widget::button("Click me").on_click("mymod:btn_click"))
    );