Skip to content
Snippets Groups Projects
Commit fca24d03 authored by Matyáš Latner's avatar Matyáš Latner
Browse files

#7 Application shutdown disposing fix

parent 5b8dd5a3
Branches
Tags
No related merge requests found
......@@ -153,9 +153,10 @@ public abstract class TablexiaApplication implements ApplicationListener {
* @param screen new screen to change for
*/
public void setScreen(AbstractTablexiaScreen<?> screen) {
processLastScreen(this.screen);
lastScreen = this.screen;
this.screen = screen;
processNewScreen(this.screen);
processLastScreen();
processNewScreen(screen);
}
/**
......@@ -200,7 +201,7 @@ public abstract class TablexiaApplication implements ApplicationListener {
new Runnable() {
@Override
public void run() {
processLastScreen(lastScreen);
processLastScreen();
}
},
......@@ -233,7 +234,7 @@ public abstract class TablexiaApplication implements ApplicationListener {
}
}
private void processLastScreen(AbstractTablexiaScreen<?> lastScreen) {
private void processLastScreen() {
if (lastScreen != null) {
inputMultiplexer.removeProcessor(lastScreen.getInputProcessor());
lastScreen.hide();
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment