fix a bug in the namefield hidden thingy

This commit is contained in:
Aaron Mueller 2013-05-16 22:14:01 +02:00
parent 22084bd6fd
commit fa057f8efe
1 changed files with 3 additions and 3 deletions

View File

@ -133,11 +133,11 @@ ig.module(
}
if (ig.input.pressed('submit-score')) {
this.nameField.kill();
//TODO: The name field does not kill itself ... this.draw();
this.saveScore(this.nameField.name(), ig.global.score, function(context) {
setTimeout(function() { context.loadScores(); }, 2000);
});
this.nameField.kill();
this.nameField = null;
}
this.parent();
},
@ -173,7 +173,7 @@ ig.module(
}
}
this.nameField.draw(260, 200);
if (this.nameField !== null) this.nameField.draw(260, 200);
this.font.draw(ig.global.score, 485, 150, ig.Font.ALIGN.RIGHT);
}
});