Skip to content

Commit

Permalink
Added Hash and Deserialize/Serialize traits to ElementState (bevyengi…
Browse files Browse the repository at this point in the history
…ne#1447)

This adds traits that are already implemented for KeyCodes/Mouse Button etc.
  • Loading branch information
maxwellodri committed Feb 22, 2021
1 parent 9bf80a8 commit ba2226a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion crates/bevy_input/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ impl Plugin for InputPlugin {
}

/// The current "press" state of an element
#[derive(Debug, Copy, Clone, Eq, PartialEq)]
#[derive(Debug, Copy, Clone, Eq, PartialEq, Hash)]
#[cfg_attr(feature = "serialize", derive(serde::Serialize, serde::Deserialize))]
pub enum ElementState {
Pressed,
Released,
Expand Down

0 comments on commit ba2226a

Please sign in to comment.