diff --git a/examples/virtual_dpad.rs b/examples/virtual_dpad.rs index 658e0bfa..f2b79f5f 100644 --- a/examples/virtual_dpad.rs +++ b/examples/virtual_dpad.rs @@ -14,11 +14,22 @@ fn main() { .run(); } -#[derive(Actionlike, PartialEq, Eq, Clone, Copy, Hash, Debug, Reflect)] +#[derive(PartialEq, Eq, Clone, Copy, Hash, Debug, Reflect)] enum Action { Move, } +impl Actionlike for Action { + fn input_control_kind(&self) -> InputControlKind { + // We're using a match statement here + // because in larger projects, you will likely have + // different input control kinds for different actions + match self { + Action::Move => InputControlKind::DualAxis, + } + } +} + #[derive(Component)] struct Player;