mirror of
https://github.com/rust-windowing/winit.git
synced 2026-08-31 05:40:04 -04:00
Add ability to send custom user events
This commit is contained in:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user