Add mouse_down accessor function

This commit is contained in:
Joonas Javanainen 2018-08-13 23:03:27 +03:00
parent cc17c0097d
commit b8a1abf1b7
No known key found for this signature in database
GPG Key ID: D39CCA5CB19B9179
2 changed files with 8 additions and 0 deletions

View File

@ -2,6 +2,10 @@
## [Unreleased]
### Added
- `ImGui::mouse_down`
## [0.0.20] - 2018-08-13
### Fixed

View File

@ -246,6 +246,10 @@ impl ImGui {
let io = self.io();
(io.mouse_delta.x, io.mouse_delta.y)
}
pub fn mouse_down(&self) -> [bool; 5] {
let io = self.io();
io.mouse_down
}
pub fn set_mouse_down(&mut self, states: [bool; 5]) {
let io = self.io_mut();
io.mouse_down = states;