add window manager system

This commit is contained in:
Nilton Constantino
2026-01-16 18:46:38 +00:00
parent e519408f51
commit a8119d71f0
11 changed files with 201 additions and 63 deletions
+2
View File
@@ -6,6 +6,7 @@ mod tile_bank;
mod sprite;
mod sample;
mod cartridge;
mod window;
pub use button::Button;
pub use cartridge::{AppHeader, AppMode, Cartridge};
@@ -15,3 +16,4 @@ pub use sprite::Sprite;
pub use tile::Tile;
pub use tile_bank::{TileBank, TileSize};
pub use tile_layer::{HudTileLayer, ScrollableTileLayer, TileMap};
pub use window::{Rect, Window, WindowId};
+21
View File
@@ -0,0 +1,21 @@
use crate::model::Color;
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub struct Rect {
pub x: i32,
pub y: i32,
pub w: i32,
pub h: i32,
}
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct WindowId(pub u32);
#[derive(Debug, Clone)]
pub struct Window {
pub id: WindowId,
pub viewport: Rect,
pub has_focus: bool,
pub title: String,
pub color: Color,
}