Opacity compositing

This commit is contained in:
2026-03-23 16:33:19 -04:00
parent 6079117f2c
commit e327516e5e
6 changed files with 42 additions and 10 deletions

View File

@@ -1,6 +1,6 @@
//! Common window model types.
use crate::scene::UiSize;
use crate::scene::{Color, UiSize};
#[derive(Clone, Copy, Debug, Eq, Hash, Ord, PartialEq, PartialOrd)]
pub struct WindowId(u64);
@@ -55,6 +55,7 @@ pub struct WindowSpec {
pub maximized: bool,
pub fullscreen: bool,
pub resizable: bool,
pub base_color: Color,
}
impl WindowSpec {
@@ -72,9 +73,15 @@ impl WindowSpec {
maximized: false,
fullscreen: false,
resizable: true,
base_color: Color::rgb(0x08, 0x0C, 0x14),
}
}
pub fn base_color(mut self, color: Color) -> Self {
self.base_color = color;
self
}
pub fn key(mut self, key: impl Into<String>) -> Self {
self.key = Some(key.into());
self