android - Touch events aren't detected in Libgdx after redrawing? -


i'm drawing menu on game screen when pause button clicked, on menu i'm drawing play button. problem once press play button touch events on game screen not detected! here's code snippet

public class gamescreen implements screen {  //some code here  public void render(float delta) { gdx.gl.glclearcolor(0, 0, 0, 1); gdx.gl.glclear(gl20.gl_color_buffer_bit); batch.setprojectionmatrix(camera.combined); batch.begin(); if(prefs.getboolean(constants.ismenuon,false)){  menu.draw(batch, menu.getx(), menu.gety(), gdx.graphics.getwidth(), gdx.graphics.getheight()); playbtn.draw(....);  } if(playbtn.istouched()){ prefs.putboolean(constants.ismenuon, true);  prefs.flush();  } ...... ... batch.end(); }   } 


Comments

Popular posts from this blog

node.js - NodeJS remote terminal to Dropbear OpenWRT-Server -

Qt4: how to send QString inside a struct via QSharedMemory -

node.js - On Gitbash - Bower : ENOGIT git is not installed or not in the PATH -