diff options
| -rw-r--r-- | src/font.rs | 8 | ||||
| -rw-r--r-- | src/lib.rs | 3 |
2 files changed, 7 insertions, 4 deletions
diff --git a/src/font.rs b/src/font.rs index 02d0a9f..d35abf0 100644 --- a/src/font.rs +++ b/src/font.rs @@ -1,9 +1,9 @@ use crate::{context, texture, shader}; -const CHAR_WIDTH: i32 = 7; -const CHAR_HEIGHT: i32 = 9; -const FONT_WIDTH: i32 = 112; -const FONT_HEIGHT: i32 = 54; +pub const CHAR_WIDTH: i32 = 7; +pub const CHAR_HEIGHT: i32 = 9; +pub const FONT_WIDTH: i32 = 112; +pub const FONT_HEIGHT: i32 = 54; pub struct Font { pub shader: shader::Shader, @@ -50,6 +50,9 @@ pub fn run<F, G>(gnew: F) where G: state::Game + 'static, F: (Fn(&context::Conte ctx.maximize_canvas(); st.handle_resize(&ctx); }, + winit::event::WindowEvent::Focused(false) => { + st.keys = state::Keys::new(); + }, winit::event::WindowEvent::MouseInput { button, state, |
