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