java - libGDX: "Ghost" button on next screen after setting screen -


it's same problem question, doesn't work me: libgdx : setting screen, still buttons old screen active

first screen:

 public void show(){     gdx.input.setinputprocessor(stage);     mybutton.addlistener(new clicklistener() {         public void touchup (inputevent event, float x, float y, int pointer, int button) {             game.setscreen(new secondscreen(game));             dispose();             return;         }     });   public void dispose(){     stage.dispose();  } 

second screen:

public void show(){    gdx.input.setinputprocessor(stage);    [...] } 

after setting new screen can still see buttons first screen opacity of ~20%. it's "ghost" button. what's reason problem?

try stage.clear() , clear screen gl method before switch screens.


Comments

Popular posts from this blog

python - Operations inside variables -

Generic Map Parameter java -

arrays - What causes a java.lang.ArrayIndexOutOfBoundsException and how do I prevent it? -