event work + mulling over sprite containers and event notification
This commit is contained in:
@@ -11,7 +11,7 @@ use winit::event::Event;
|
||||
|
||||
/// Trait which may be inherited by objects that wish to be drawn to the screen
|
||||
pub trait Drawable {
|
||||
fn get(&self) -> VertexTypes;
|
||||
fn get(&self) -> Vec<VertexTypes>;
|
||||
}
|
||||
|
||||
/// Trait which may be inherited by objects that wish to receive events
|
||||
@@ -29,7 +29,7 @@ impl CanvasFrame {
|
||||
|
||||
/// Push this drawable onto the back of the accumulator
|
||||
pub fn draw(&mut self, drawable: &dyn Drawable) {
|
||||
self.map.push(drawable.get());
|
||||
drawable.get().iter().map(|x| {self.map.push(x.clone())});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user