Why is my TextButton
, from libgdx not responding on clicks?
I have a button, this button has a Listener, but it doesn't respond. The button is showing, but it doesn't respond on mouse clicks.
public MyStage extends Stage {
...
next.addListener(new InputListener() {
@Override
public boolean touchDown(InputEvent event, float x, float y, int pointer, int button)
{
Gdx.app.log(ApothecaryGame.LOG, "Pressed: Next button.");
return true;
}
@Override
public void touchUp(InputEvent event, float x, float y, int pointer, int button) {
Gdx.app.log( ApothecaryGame.LOG, "Released: Next button.");
super.touchUp( event, x, y, pointer, button );
nextPage();
}
} );
this.addActor(next);
}