better inputs, log config
This commit is contained in:
@@ -64,7 +64,7 @@ pub trait Game {
|
||||
fn update(self: &mut Self, game_data: &mut GameData);
|
||||
|
||||
/// Returns true if event should be ignored by the vulkan handler
|
||||
fn on_window_event(self: &mut Self, game_data: &mut GameData, event: &Event);
|
||||
fn on_window_event(self: &mut Self, event: &Event);
|
||||
}
|
||||
|
||||
pub struct GameData {
|
||||
@@ -365,7 +365,7 @@ pub fn init(mesh_path: &str, line_vertices: Vec<LinePoint>, game: &mut dyn Game)
|
||||
// wait would happen. Blocking may be the desired behavior, but if you don't want to
|
||||
// block you should spawn a separate thread dedicated to submissions.
|
||||
events_loop.poll_events(|ev| {
|
||||
game.on_window_event(&mut data, &ev);
|
||||
game.on_window_event(&ev);
|
||||
match ev {
|
||||
Event::WindowEvent { event: WindowEvent::CloseRequested, .. } => data.shutdown = true,
|
||||
Event::WindowEvent { event: WindowEvent::Resized(_), .. } => recreate_swapchain = true,
|
||||
|
||||
Reference in New Issue
Block a user