From f64eaf1557ea49e7cec9dc1effc8b2deb01cdcf4 Mon Sep 17 00:00:00 2001 From: shivshank Date: Sat, 25 Aug 2018 16:55:02 -0400 Subject: [PATCH] Update CHANGELOG --- CHANGELOG.md | 17 +++++++++++++++++ src/breakout.rs | 2 ++ src/core.rs | 2 ++ 3 files changed, 21 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ff15a09..0029a97 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,22 @@ # Change Log +## [v0.6.0] - 2018-08-25 + +I considered adding `mouse_scale` to `BasicInput` which would allow the user to map back to +pixel coordinates if that's really what they want, but most of the time I'm guessing people +will want buffer coordinates. + +The library needs to expose window size better (probably via `window_size` in `BasicInput`), +but I will hold off on both of these additions until there is a clear use case. It is not clear +what type (float or integer) these fields should be (logical size or physical size?). + +A `mouse_as_buffer_index` method might also be useful for `BasicInput`. + +### Changed + + - Changed glutin basic input handling to report positions as f64 instead of usize, which is a + bit limiting. + ## [v0.5.1] - 2018-08-25 Started a change log! diff --git a/src/breakout.rs b/src/breakout.rs index 172784a..b0e7daa 100644 --- a/src/breakout.rs +++ b/src/breakout.rs @@ -38,6 +38,8 @@ pub struct BasicInput { } impl BasicInput { + // TODO: Do we want to add a `mouse_as_buffer_index` or method or something like that? + /// If the mouse was pressed this last frame. pub fn mouse_pressed(&self, button: MouseButton) -> bool { &(false, true) == self.mouse.get(&button).unwrap_or(&(false, false)) diff --git a/src/core.rs b/src/core.rs index 6319cf8..ba0cff3 100644 --- a/src/core.rs +++ b/src/core.rs @@ -234,6 +234,8 @@ impl Internal { let dpi_factor = self.gl_window.get_hidpi_factor(); let (x, y) = size.to_physical(dpi_factor).into(); self.resize_viewport(x, y); + // TODO: We should store window size in BasicInput, but as what type? OpenGL wants + // integer window sizes but we also have to deal with physical vs. logical size self.redraw(); } else { if redraw {