Added Hash and Deserialize/Serialize traits to ElementState (#1447)

This adds traits that are already implemented for KeyCodes/Mouse Button etc.
This commit is contained in:
maxwellodri 2021-02-22 03:59:37 +00:00
parent 9bf80a8566
commit ba2226a487

View file

@ -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,