minifb_wrapper 0.1.3

A wrapper around minifb to make managing windows easier than ever
Documentation
  • Coverage
  • 64%
    16 out of 25 items documented4 out of 16 items with examples
  • Size
  • Source code size: 14.96 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 592.08 kB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 26s Average build duration of successful builds.
  • all releases: 26s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • Repository
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • JamieH01

A wrapper around minifb that makes opening and managing windows as straightforward as possible, and with hexidecimal RGB rather than raw u32.

This is an example code that will generate a UV coordinate map:

use miniwrap::*;

fn main() -> Result<(), WinErr> {
    let mut window = window!(?255, 255, "Window", "FFFFFF");

    //iterates with the value and position
    for (_, pos) in window.iter() {
        let r = to_hex2(pos.0 as u8).unwrap();
        let g = to_hex2(pos.1 as u8).unwrap();
        let string = format!("{r}{g}00");

        window.set(pos, &string)?;
    }

    //pressing escape will close the window
    loop {
        window.update();
    }    
}