I want to make a cross-complied GUI app

My GUI is 2D grid of pixels. I want to create the window in the floor.init(); and then later change the grid color with floor.set_floor_color(&floor_grid);
Could you suggest how can this be implemented, or what creates could I use?

use std::env;

use std::thread;
use std::time::Duration;

mod floor_simulator;
use floor_simulator::Floor;

mod tile;
use tile::Tile;

fn main() {
    // Check the code is running locally on the simulator
    let run_simulator_locally = env::var("FLOOR_SIMULATOR").is_ok();

    if run_simulator_locally {
        println!("Floor Simulator");

        let floor_grid: Vec<Vec<Tile>> = Vec::new();

        let mut floor = Floor::new(11, 17);
        floor.init();

        floor.set_floor_color(&floor_grid);

    } else {
        println!("Interactive Floor");
    }
}

Try pixels and also see here: 2D Rendering | Are we game yet?

This topic was automatically closed 90 days after the last reply. We invite you to open a new topic if you have further questions or comments.