Skip to content

Commit 03d544a

Browse files
committed
Key bindings example
1 parent 85244da commit 03d544a

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

examples/key_binding.rs

+7-1
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,13 @@ fn main() {
1818

1919
#[cfg(any(target_os = "macos", target_os = "windows", target_os = "linux"))]
2020
fn main() {
21+
#[path = "util/fill.rs"]
22+
mod fill;
23+
2124
simple_logger::SimpleLogger::new().init().unwrap();
2225
let event_loop = EventLoop::new();
2326

24-
let _window = WindowBuilder::new()
27+
let window = WindowBuilder::new()
2528
.with_inner_size(LogicalSize::new(400.0, 200.0))
2629
.build(&event_loop)
2730
.unwrap();
@@ -53,6 +56,9 @@ fn main() {
5356
}
5457
_ => (),
5558
},
59+
Event::RedrawRequested(_) => {
60+
fill::fill_window(&window);
61+
}
5662
_ => (),
5763
};
5864
});

0 commit comments

Comments
 (0)