aboutsummaryrefslogtreecommitdiff
path: root/src/window.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/window.rs')
-rw-r--r--src/window.rs14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/window.rs b/src/window.rs
index 2c1bf7b2..cb753d40 100644
--- a/src/window.rs
+++ b/src/window.rs
@@ -70,7 +70,7 @@ type Result<T> = ::std::result::Result<T, Error>;
pub struct Window {
event_loop: EventsLoop,
window: glutin::GlWindow,
- cursor_visible: bool,
+ mouse_visible: bool,
/// Whether or not the window is the focused window.
pub is_focused: bool,
@@ -243,7 +243,7 @@ impl Window {
let window = Window {
event_loop,
window,
- cursor_visible: true,
+ mouse_visible: true,
is_focused: false,
};
@@ -326,16 +326,16 @@ impl Window {
});
}
- /// Set cursor visible
- pub fn set_cursor_visible(&mut self, visible: bool) {
- if visible != self.cursor_visible {
- self.cursor_visible = visible;
+ /// Set mouse cursor visible
+ pub fn set_mouse_visible(&mut self, visible: bool) {
+ if visible != self.mouse_visible {
+ self.mouse_visible = visible;
if let Err(err) = self.window.set_cursor_state(if visible {
CursorState::Normal
} else {
CursorState::Hide
}) {
- warn!("Failed to set cursor visibility: {}", err);
+ warn!("Failed to set mouse cursor visibility: {}", err);
}
}
}