Re-organize into module structure

This commit is contained in:
Osspial
2018-08-22 23:01:36 -04:00
parent f20fac99f6
commit 4377680a44
31 changed files with 740 additions and 701 deletions

View File

@@ -1,9 +1,12 @@
extern crate winit;
use winit::window::WindowBuilder;
use winit::event::{Event, WindowEvent};
use winit::event_loop::{EventLoop, ControlFlow};
fn main() {
let events_loop = winit::EventLoop::new();
let events_loop = EventLoop::new();
let window = winit::WindowBuilder::new().with_decorations(false)
let window = WindowBuilder::new().with_decorations(false)
.with_transparency(true)
.build(&events_loop).unwrap();
@@ -13,9 +16,9 @@ fn main() {
println!("{:?}", event);
match event {
winit::Event::WindowEvent { event: winit::WindowEvent::CloseRequested, .. } =>
*control_flow = winit::ControlFlow::Exit,
_ => *control_flow = winit::ControlFlow::Wait,
Event::WindowEvent { event: WindowEvent::CloseRequested, .. } =>
*control_flow = ControlFlow::Exit,
_ => *control_flow = ControlFlow::Wait,
}
});
}