java - LibGdx avoid TouchUp after screen change -


upon touchdown() call game.setscreen(new screenclass(this));

this works great when gets new screen , release mouse (or lift finger) new screen firing touchup() event. there way prevent first touchup getting recorded ?

you can add flag on second screen ignore first touchup event.

private boolean isfirsttouchup = true; 

in touchup event, add code,

if(isfirsttouchup){  isfirsttouchup = false; }else{  // touchup event here, } 

hope can :d


Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

java - Using an Integer ArrayList in Android -