use crate::image::load_image_2d;
use super::Background;
impl super::Window {
pub fn set_background_color(&mut self, color: u32) {
self.background = Some(Background::Color(color));
}
pub fn set_background_image(&mut self, path: &str) {
let image: Vec<Vec<u32>> = load_image_2d(path).expect("Failed to load image");
self.background = Some(Background::Image(image));
}
}