From ba2226a48724fdc0d68bac8f0fd66f79c26c9aad Mon Sep 17 00:00:00 2001 From: maxwellodri Date: Mon, 22 Feb 2021 03:59:37 +0000 Subject: [PATCH] Added Hash and Deserialize/Serialize traits to ElementState (#1447) This adds traits that are already implemented for KeyCodes/Mouse Button etc. --- crates/bevy_input/src/lib.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crates/bevy_input/src/lib.rs b/crates/bevy_input/src/lib.rs index bdf91df42d..9d5b5ec118 100644 --- a/crates/bevy_input/src/lib.rs +++ b/crates/bevy_input/src/lib.rs @@ -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,