add window manager system
This commit is contained in:
@@ -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};
|
||||
|
||||
@@ -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,
|
||||
}
|
||||
Reference in New Issue
Block a user