Add ability to send custom user events

This commit is contained in:
Osspial
2018-08-19 13:44:22 -04:00
parent a0b2bb3695
commit 2c607ff87f
12 changed files with 178 additions and 122 deletions

View File

@@ -26,10 +26,10 @@ another library.
extern crate winit;
fn main() {
let mut events_loop = winit::EventsLoop::new();
let window = winit::Window::new(&events_loop).unwrap();
let mut event_loop = winit::EventLoop::new();
let window = winit::Window::new(&event_loop).unwrap();
events_loop.run_forever(|event| {
event_loop.run(|event| {
match event {
winit::Event::WindowEvent {
event: winit::WindowEvent::CloseRequested,