Skip to content

Commit

Permalink
fix: center text correctly
Browse files Browse the repository at this point in the history
Fixes #27
  • Loading branch information
dwmkerr authored Aug 22, 2019
1 parent 0fc59ad commit 6f1eadd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion js/spaceinvaders.js
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ WelcomeState.prototype.draw = function(game, dt, ctx) {

ctx.font="30px Arial";
ctx.fillStyle = '#ffffff';
ctx.textBaseline="center";
ctx.textBaseline="middle";
ctx.textAlign="center";
ctx.fillText("Space Invaders", game.width / 2, game.height/2 - 40);
ctx.font="16px Arial";
Expand Down

0 comments on commit 6f1eadd

Please sign in to comment.