Opacity compositing
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user