Collects device input sources related values.
Version: 2.0
Price: $20
- Now compatible with ShiVa 2.0.
- Plugin API compiled for Mac and Linux in addition to Windows : it will provide API completion in the Script module in ShiVa Editor for each of these operating systems.
- Now uses a user token instead of an email to activate

- Added function removeUser ( hUser )

The following functions now return the press duration if the key/button is pressed:
- bYes, nDuration = JPInput.isKeyboardKeyDown ( kKeyCode )
- bYes, nDuration = JPInput.isMouseButtonDown ( nButton )

New feature: Smoothed input values, starting with the onJoypadMove values:
JPInput.setJoypadMoveSmoothingEnabled ( bEnabled, nOptCoef )
To get the smoothed values, implement the onJoypadMoveSmoothed handler, same parameters as the original onJoypadMove.

- Optimized for ShiVa 1.9.2

- function JPInput.getMouseAverage changed to:
nAverageSpeedX, nAverageSpeedY = JPInput.getMouseAverageSpeed ( )


JPInput is the pack to have if you want to easily get values about most of the device input sources.

No need to implement mouse, keyboard, joypad handlers to be informed of the sources state anymore. JPInput provides functions you can call from everywhere to get these values.

For instance:

--Mouse bYes = JPInput.isMouseButtonDown ( nButton ) --Keyboard bYes = JPInput.isKeyboardKeyDown ( kKeyCode ) --Joypad bState = JPInput.getJoypadButtonState ( nJoypad, nButton ) nAxisX, nAxisY, nAxisZ = JPInput.getJoypadState ( nJoypad, nPart ) nAxisX, nAxisY = JPInput.getJoypadStickState ( nJoypad, nStick )

Note that JPInput can also provide values about multi touch. This feature requires the JPMultiTouch pack.