Browse Source

Adjust some text rendering

Thomas Dy 11 years ago
parent
commit
4152968986
1 changed files with 5 additions and 4 deletions
  1. 5 4
      scripts/game.js

+ 5 - 4
scripts/game.js

@@ -230,15 +230,15 @@ var MainMenu = new Scene();
     var canvasHM = canvasH/2;
     ctx.font = font(48);
     ctx.fillText(alternate ? 'SoundVoyager' : 'audventure', canvasWM, canvasHM - 50);
-    ctx.font = font(12);
+    ctx.font = font(16);
     games.forEach(function(game, index) {
-      var y = canvasHM + 10 + index * 20;
+      var y = canvasHM + 10 + index * 25;
       var name = alternate ? game.alt : game.name;
       ctx.fillText(name, canvasWM, y);
       if(index == selected) {
         var offset = ctx.measureText(name).width / 2 + 10;
-        drawTriangle(canvasWM - offset, y - 4, 10, 7);
-        drawTriangle(canvasWM + offset, y - 4, 10, -7);
+        drawTriangle(canvasWM - offset, y - 5, 10, 7);
+        drawTriangle(canvasWM + offset, y - 5, 10, -7);
       }
     });
   };
@@ -280,6 +280,7 @@ var PauseScreen = new Scene();
     Game.context.fillText('Paused', Game.canvas.width/2, Game.canvas.height/2 - 30);
     Game.context.fillText('P to unpause', Game.canvas.width/2, Game.canvas.height/2);
     Game.context.fillText('Q to quit', Game.canvas.width/2, Game.canvas.height/2 + 20);
+    Game.context.textAlign = 'left';
   };
 })();