v0.4.3b: cleaned up how toasts are managed
This commit is contained in:
parent
f35392fd8d
commit
10e1a17704
|
@ -556,6 +556,7 @@ public class GameScene extends PixelScene {
|
|||
private synchronized void prompt( String text ) {
|
||||
|
||||
if (prompt != null) {
|
||||
prompt.destroy();
|
||||
prompt.killAndErase();
|
||||
prompt = null;
|
||||
}
|
||||
|
|
|
@ -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 );
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user