1 decade ago by norashishi
Hi guys, there is an issue I couldn't solve by myself.
When you use several fingers on the touch panel devices, the 2nd tap breaks the
Simply tap the impact canvas first, keep pressing the 1st tap and tap with another finger, nothing happen because
Is there any way to block the 2nd finger's input? I tested with impact 1.22 on iPad. Thank you!
main.js
When you use several fingers on the touch panel devices, the 2nd tap breaks the
ig.input.state
.Simply tap the impact canvas first, keep pressing the 1st tap and tap with another finger, nothing happen because
ig.input.state
is already true
, release one of those fingers, ig.input.released
will be true
and ig.input.state
will be false
even though another finger is still touching the screen.Is there any way to block the 2nd finger's input? I tested with impact 1.22 on iPad. Thank you!
main.js
ig.module( 'game.main' ) .requires( 'impact.game', 'impact.font' ) .defines(function(){ MyGame = ig.Game.extend({ font: new ig.Font( 'media/04b03.font.png' ), count: 0, init: function() { ig.input.bind(ig.KEY.MOUSE1, 'press'); }, draw: function() { this.parent(); if( ig.input.pressed( 'press' ) ) { this.count++; } var x = ig.system.width/2, y = ig.system.height/2; this.font.draw( this.count +'\n'+ig.input.state('press'), x, y, ig.Font.ALIGN.CENTER ); } }); ig.main( '#canvas', MyGame, 60, 320, 240, 2 ); });