Answer the question
In order to leave comments, you need to log in
How to set a reference to the class from which it is created in InputAdapter?
In the class method I create
InputProcessor backProcessor = new InputAdapter() {
@Override
public boolean keyDown(int keycode) {
if ((keycode == Input.Keys.ESCAPE) || (keycode == Input.Keys.BACK)) {
// Gdx.app.exit();
game.setScreen(new ExitInGame(game,this_up_class));
}
return false;
}
Answer the question
In order to leave comments, you need to log in
OuterClass.this.
And not a reference to a class, but a reference to an instance of the class.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question