mirror of
https://github.com/griffi-gh/hUI.git
synced 2024-11-22 15:18:43 -06:00
hook up winit impl to examples
This commit is contained in:
parent
45bbdd57fd
commit
3a8ff21189
|
@ -8,6 +8,7 @@ publish = false
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
hui = { path = "../hui" }
|
hui = { path = "../hui" }
|
||||||
hui-glium = { path = "../hui-glium" }
|
hui-glium = { path = "../hui-glium" }
|
||||||
|
hui-winit = { path = "../hui-winit" }
|
||||||
kubi-logging = { git = "https://github.com/griffi-gh/kubi", rev = "c162893fd" }
|
kubi-logging = { git = "https://github.com/griffi-gh/kubi", rev = "c162893fd" }
|
||||||
glium = "0.34"
|
glium = "0.34"
|
||||||
winit = "0.29"
|
winit = "0.29"
|
||||||
|
|
|
@ -28,6 +28,7 @@ pub fn ui(mut x: impl FnMut(&mut UiInstance, Vec2)) {
|
||||||
|
|
||||||
event_loop.run(|event, window_target| {
|
event_loop.run(|event, window_target| {
|
||||||
window_target.set_control_flow(ControlFlow::Poll);
|
window_target.set_control_flow(ControlFlow::Poll);
|
||||||
|
hui_winit::handle_winit_event(&mut hui, &event);
|
||||||
match event {
|
match event {
|
||||||
Event::WindowEvent { event: WindowEvent::CloseRequested, .. } => {
|
Event::WindowEvent { event: WindowEvent::CloseRequested, .. } => {
|
||||||
window_target.exit();
|
window_target.exit();
|
||||||
|
|
Loading…
Reference in a new issue