Update CHANGELOG

This commit is contained in:
shivshank 2018-08-25 16:55:02 -04:00
parent 1e71fefe90
commit f64eaf1557
3 changed files with 21 additions and 0 deletions

View file

@ -1,5 +1,22 @@
# Change Log # 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 ## [v0.5.1] - 2018-08-25
Started a change log! Started a change log!

View file

@ -38,6 +38,8 @@ pub struct BasicInput {
} }
impl 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. /// If the mouse was pressed this last frame.
pub fn mouse_pressed(&self, button: MouseButton) -> bool { pub fn mouse_pressed(&self, button: MouseButton) -> bool {
&(false, true) == self.mouse.get(&button).unwrap_or(&(false, false)) &(false, true) == self.mouse.get(&button).unwrap_or(&(false, false))

View file

@ -234,6 +234,8 @@ impl Internal {
let dpi_factor = self.gl_window.get_hidpi_factor(); let dpi_factor = self.gl_window.get_hidpi_factor();
let (x, y) = size.to_physical(dpi_factor).into(); let (x, y) = size.to_physical(dpi_factor).into();
self.resize_viewport(x, y); 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(); self.redraw();
} else { } else {
if redraw { if redraw {