improved title placement

This commit is contained in:
Michael Yang 2018-02-15 16:05:28 -05:00
parent 19d40c1fc1
commit 090e6cb379

View file

@ -41,8 +41,8 @@ function drawScoreboard() {
var h = trueCanvas.height / 2 + gdy + 100 * settings.scale; var h = trueCanvas.height / 2 + gdy + 100 * settings.scale;
if (gameState === 0) { if (gameState === 0) {
renderText(trueCanvas.width / 2 + gdx + 6 * settings.scale, trueCanvas.height / 2 + gdy, 60, "rgb(236, 240, 241)", String.fromCharCode("0xf04b"), 'px FontAwesome'); renderText(trueCanvas.width / 2 + gdx + 6 * settings.scale, trueCanvas.height / 2 + gdy, 60, "rgb(236, 240, 241)", String.fromCharCode("0xf04b"), 'px FontAwesome');
renderText(trueCanvas.width / 2 + gdx + 6 * settings.scale, trueCanvas.height / 2 + gdy - 155 * settings.scale, 150, "#2c3e50", "Hextris"); renderText(trueCanvas.width / 2 + gdx + 6 * settings.scale, trueCanvas.height / 2.15 + gdy - 155 * settings.scale, 150, "#2c3e50", "Hextris");
renderText(trueCanvas.width / 2 + gdx + 5 * settings.scale, h, fontSize, "rgb(44,62,80)", 'Play!'); renderText(trueCanvas.width / 2 + gdx + 5 * settings.scale, h + 10, fontSize, "rgb(44,62,80)", 'Play!');
} else if (gameState != 0 && textOpacity > 0) { } else if (gameState != 0 && textOpacity > 0) {
textOpacity -= 0.05; textOpacity -= 0.05;
renderText(trueCanvas.width / 2 + gdx + 6 * settings.scale, trueCanvas.height / 2 + gdy, 60, "rgb(236, 240, 241)", String.fromCharCode("0xf04b"), 'px FontAwesome'); renderText(trueCanvas.width / 2 + gdx + 6 * settings.scale, trueCanvas.height / 2 + gdy, 60, "rgb(236, 240, 241)", String.fromCharCode("0xf04b"), 'px FontAwesome');