Hide cursor in terminal mode (busy_on event)

This commit is contained in:
daa 2017-10-30 23:04:28 +03:00
parent 67cb4570ac
commit 068119fe19
1 changed files with 9 additions and 3 deletions

View File

@ -89,15 +89,21 @@ impl Cursor {
}
pub fn reset_state(&mut self) {
self.start();
if self.state.borrow().anim_phase != AnimPhase::Busy {
self.start();
}
}
pub fn enter_focus(&mut self) {
self.start();
if self.state.borrow().anim_phase != AnimPhase::Busy {
self.start();
}
}
pub fn leave_focus(&mut self) {
self.state.borrow_mut().reset_to(AnimPhase::NoFocus);
if self.state.borrow().anim_phase != AnimPhase::Busy {
self.state.borrow_mut().reset_to(AnimPhase::NoFocus);
}
}
pub fn busy_on(&mut self) {