remove context from ui (again) and create weird trait for it

This commit is contained in:
2025-09-24 17:41:25 -04:00
parent 26c248dcba
commit 719bee4b31
12 changed files with 107 additions and 92 deletions

View File

@@ -9,7 +9,7 @@ pub struct Input {
}
impl Input {
pub fn event(&mut self, event: &WindowEvent) {
pub fn event(&mut self, event: &WindowEvent) -> bool {
match event {
WindowEvent::CursorMoved { position, .. } => {
self.cursor.pos = Vec2::new(position.x as f32, position.y as f32);
@@ -28,8 +28,9 @@ impl Input {
WindowEvent::CursorLeft { .. } => {
self.cursor.exists = false;
}
_ => (),
_ => return false,
}
true
}
pub fn end_frame(&mut self) {