parent
b5aa96bea4
commit
189a0080a6
3 changed files with 12 additions and 4 deletions
|
|
@ -1019,6 +1019,13 @@ pub enum ElementState {
|
|||
Released,
|
||||
}
|
||||
|
||||
impl ElementState {
|
||||
/// True if `self == Pressed`.
|
||||
pub fn is_pressed(self) -> bool {
|
||||
self == ElementState::Pressed
|
||||
}
|
||||
}
|
||||
|
||||
/// Describes a button of a mouse controller.
|
||||
///
|
||||
/// ## Platform-specific
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue