From a8bec468d50fae94a1b0cf9ec45f0944c72c7b2b Mon Sep 17 00:00:00 2001 From: Aaron Mueller Date: Thu, 16 May 2013 22:26:06 +0200 Subject: [PATCH] Set the right position for the namefield --- dev/lib/game/main.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dev/lib/game/main.js b/dev/lib/game/main.js index 7d7d625..9ebdf90 100755 --- a/dev/lib/game/main.js +++ b/dev/lib/game/main.js @@ -123,7 +123,7 @@ ig.module( init: function() { ig.input.bind(ig.KEY.ENTER, 'submit-score'); ig.input.bind(ig.KEY.ESCAPE, 'main-menu'); - this.nameField = ig.game.spawnEntity(EntityNameField, 250, 150); + this.nameField = ig.game.spawnEntity(EntityNameField, 363, 219); this.loadScores(); }, @@ -132,7 +132,7 @@ ig.module( ig.system.setGame(StartScreen); } - if (ig.input.pressed('submit-score')) { + if (ig.input.pressed('submit-score') && this.nameField !== null) { this.saveScore(this.nameField.name(), ig.global.score, function(context) { setTimeout(function() { context.loadScores(); }, 2000); }); @@ -173,7 +173,7 @@ ig.module( } } - if (this.nameField !== null) this.nameField.draw(260, 200); + if (this.nameField !== null) this.nameField.draw(); this.font.draw(ig.global.score, 485, 150, ig.Font.ALIGN.RIGHT); } });