--JPMultiTouch API JPMultiTouch.activate ( sUserToken, sActivationKey ) JPMultiTouch.setMaxTouchInputCount ( nMaxTouchInputCount ) nCount = JPMultiTouch.getCurrentTouchInputCount ( ) JPMultiTouch.addUser ( hUser ) JPMultiTouch.removeUser ( hUser ) --User notification events: "onTouchInputBegin" ( nIndex, nPointX, nPointY ) "onTouchInputChange" ( nIndex, nPointX, nPointY, nDeltaX, nDeltaY ) "onTouchInputEnd" ( nIndex, nPointX, nPointY )
ShiVa's multitouch is really hard to manage, compared to the mouse. "Taps" in the "onTouchSequenceChange" handler are not very convenient because all the inputs are sent to a unique handler and when the number of detected fingers change, the input order can change.
With JPMultiTouch, you are done with all of these problems, the multitouch management becomes so easy, using the same method than the mouse. Each time a finger is pressed, moved or released, specific handlers are called for each one: "onTouchInputBegin", "onTouchInputChange" and "onTouchInputEnd".
But wait, that's not all, by combining JPMultiTouch with JPButton, you provide to your HUD buttons the possibility to be used in multitouch, I mean you will be able to click on several buttons at once. Very convenient for games using a virtual game pad, for instance! There's nothing else to do than to add these 2 packs to your game and call JPButton.enableMultitouch ( true ) and it will work like a charm!