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

php - Hide output during test execution -

javascript - Migrate custom AngularJS filter from 1.2.28 to 1.4.x -

Update Magento products with multiple images -