v0.4.3b: cleaned up how toasts are managed

This commit is contained in:
Evan Debenham 2016-11-02 18:52:27 -04:00
parent f35392fd8d
commit 10e1a17704
2 changed files with 1 additions and 7 deletions

View File

@ -556,6 +556,7 @@ public class GameScene extends PixelScene {
private synchronized void prompt( String text ) {
if (prompt != null) {
prompt.destroy();
prompt.killAndErase();
prompt = null;
}

View File

@ -77,13 +77,6 @@ public class Toast extends Component {
PixelScene.align(text);
}
@Override
public synchronized void kill() {
super.kill();
//need to also destroy the text so that memory is freed
text.destroy();
}
public void text( String txt ) {
text.text( txt );
}