going to abstract the events like I did for the vkcaster

This commit is contained in:
2020-07-30 23:11:56 -07:00
parent f1d60493f4
commit 0cce359c28
3 changed files with 60 additions and 46 deletions

View File

@@ -7,7 +7,7 @@ use crate::canvas::managed::handles::{CanvasTextureHandle, CanvasImageHandle, Ca
use vulkano::pipeline::vertex::Vertex;
use std::any::Any;
use crate::VertexTypes;
use vulkano::sync::Event;
use winit::event::Event;
/// Trait which may be inherited by objects that wish to be drawn to the screen
pub trait Drawable {
@@ -15,8 +15,8 @@ pub trait Drawable {
}
/// Trait which may be inherited by objects that wish to receive events
pub trait Eventable {
fn notify(&self, event: &Event) -> ();
pub trait Eventable<T> {
fn notify(&mut self, event: &Event<T>) -> ();
}
/// Accumulator for Vectors of VertexTypes