This commit is contained in:
2025-06-25 17:18:23 +02:00
parent 08f1d3364b
commit 7693711aa9
+3 -1
View File
@@ -5,7 +5,7 @@ use std::{
pub mod text; pub mod text;
pub trait Event: Any {} pub trait Event {}
pub struct Screen { pub struct Screen {
element: Box<dyn Element>, element: Box<dyn Element>,
@@ -13,8 +13,10 @@ pub struct Screen {
} }
impl Screen { impl Screen {
pub fn on_event<E: Event, F: FnMut(E)>(&mut self, f: F) {
} }
}
pub trait Element { pub trait Element {
fn init(&mut self, screen: &mut Screen); fn init(&mut self, screen: &mut Screen);