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
Post a Comment