v0.3.4: added the ability for windows to persist between scene resets

This commit is contained in:
Evan Debenham
2016-02-03 16:10:22 -05:00
parent 5d4d0bf138
commit d1c70f038b
6 changed files with 126 additions and 70 deletions
@@ -158,7 +158,16 @@ public class TitleScene extends PixelScene {
ExitButton btnExit = new ExitButton();
btnExit.setPos( w - btnExit.width(), 0 );
add( btnExit );
if (windowOnCreate != null){
try{
add(windowOnCreate.newInstance());
} catch (Exception e){
ShatteredPixelDungeon.reportException(e);
}
windowOnCreate = null;
}
fadeIn();
}