Merge remote-tracking branch 'origin/master' into clientstates

This commit is contained in:
timokoesters
2020-02-24 21:34:17 +01:00
133 changed files with 4209 additions and 2182 deletions

View File

@ -57,12 +57,12 @@ impl Input {
/// Whether it's the first frame this input has been in
/// its current state
pub fn is_just_pressed(&self) -> bool { (self.just_changed && self.is_pressed()) }
pub fn is_just_pressed(&self) -> bool { self.just_changed && self.is_pressed() }
/// Whether input has been in current state longer than
/// `DEFAULT_HOLD_DURATION`
pub fn is_held_down(&self) -> bool {
(self.is_pressed() && self.duration >= DEFAULT_HOLD_DURATION)
self.is_pressed() && self.duration >= DEFAULT_HOLD_DURATION
}
/// Whether input has been pressed for longer than `threshold`