mirror of
https://github.com/rust-windowing/winit.git
synced 2026-08-30 05:10:03 -04:00
Get to a state where a canvas is spawned
This commit is contained in:
@@ -1,4 +1,7 @@
|
||||
extern crate winit;
|
||||
#[macro_use]
|
||||
extern crate stdweb;
|
||||
|
||||
use winit::window::WindowBuilder;
|
||||
use winit::event::{Event, WindowEvent};
|
||||
use winit::event_loop::{EventLoop, ControlFlow};
|
||||
@@ -10,9 +13,10 @@ fn main() {
|
||||
.with_title("A fantastic window!")
|
||||
.build(&event_loop)
|
||||
.unwrap();
|
||||
console!(log, "Built window!");
|
||||
|
||||
event_loop.run(|event, _, control_flow| {
|
||||
println!("{:?}", event);
|
||||
console!(log, format!("{:?}", event));
|
||||
|
||||
match event {
|
||||
Event::WindowEvent {
|
||||
|
||||
Reference in New Issue
Block a user