From 4745dcad1daaf86fb5f5e2dd7f5f8352e293ec23 Mon Sep 17 00:00:00 2001 From: griffi-gh Date: Thu, 29 Feb 2024 16:11:29 +0100 Subject: [PATCH] hook up winit impl to examples --- hui-examples/Cargo.toml | 1 + hui-examples/boilerplate.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/hui-examples/Cargo.toml b/hui-examples/Cargo.toml index 67e5bde..9314960 100644 --- a/hui-examples/Cargo.toml +++ b/hui-examples/Cargo.toml @@ -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" diff --git a/hui-examples/boilerplate.rs b/hui-examples/boilerplate.rs index 060a62c..84d52e3 100644 --- a/hui-examples/boilerplate.rs +++ b/hui-examples/boilerplate.rs @@ -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();