Refactor menu input a bit
This commit is contained in:
@@ -21,9 +21,8 @@ pub fn sample_gamepad(pad: &Gamepad, input_map: &BaseInputMap) -> FighterInputFr
|
||||
// Digital buttons driving movement isn't used by the
|
||||
// default bindings (the stick covers that), but stay
|
||||
// consistent with the keyboard backend if one is added.
|
||||
InputMapAction::MovementXDir(sign) if pressed => movement.x += sign as f32,
|
||||
InputMapAction::MovementYDir(sign) if pressed => movement.y += sign as f32,
|
||||
_ => {}
|
||||
InputMapAction::MovementXDir(sign) => if pressed { movement.x += sign as f32 },
|
||||
InputMapAction::MovementYDir(sign) => if pressed { movement.y += sign as f32 },
|
||||
}
|
||||
}
|
||||
// gamepad does not have a separate axis for left and right, so sign here should be 1
|
||||
|
||||
Reference in New Issue
Block a user