going to abstract the events like I did for the vkcaster
This commit is contained in:
13
src/main.rs
13
src/main.rs
@@ -23,7 +23,7 @@ use winit::event_loop::{EventLoop, ControlFlow};
|
||||
use winit::platform::unix::WindowBuilderExtUnix;
|
||||
use winit::window::WindowBuilder;
|
||||
|
||||
use crate::canvas::canvas_frame::{CanvasFrame, Drawable};
|
||||
use crate::canvas::canvas_frame::{CanvasFrame, Drawable, Eventable};
|
||||
use crate::canvas::managed::handles::{CanvasFontHandle, CanvasTextureHandle, Handle};
|
||||
use crate::compute::compu_frame::CompuFrame;
|
||||
use crate::compute::managed::handles::{CompuBufferHandle, CompuKernelHandle};
|
||||
@@ -114,7 +114,7 @@ pub fn main() {
|
||||
//let font_handle : Arc<CanvasFontHandle> =
|
||||
// processor.get_font_handle(String::from("sansation.ttf")).unwrap();
|
||||
|
||||
let funky_sprite = Sprite::new((0.0, 0.5), (0.5, 0.5), 0, funky_handle.clone());
|
||||
let mut funky_sprite = Sprite::new((0.0, 0.5), (0.5, 0.5), 0, funky_handle.clone());
|
||||
let sfml_sprite = Sprite::new((0.0, -0.5), (0.5, 0.5), 1, sfml_handle.clone());
|
||||
let rect = Rect::new((-0.5, -0.5), (0.5, 0.5), 1);
|
||||
|
||||
@@ -200,11 +200,14 @@ pub fn main() {
|
||||
_ => ()
|
||||
}
|
||||
}
|
||||
// Event::DeviceEvent { event: DeviceEvent::Button(mouse_input), .. } => {
|
||||
// mouse_xy.x
|
||||
// },
|
||||
_ => ()
|
||||
}
|
||||
|
||||
match event {
|
||||
_ => {
|
||||
funky_sprite.notify(&event);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
drop(l);
|
||||
|
||||
Reference in New Issue
Block a user