From 478346bbab9bd6be945c69f36c9f471e8a1de8d1 Mon Sep 17 00:00:00 2001 From: Elijah Cohen Date: Wed, 8 May 2019 04:09:58 -0500 Subject: [PATCH] very basic ending text --- web/draw.js | 10 +++++++++- web/main.js | 1 + 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/web/draw.js b/web/draw.js index 1312ccd..0b3ca4d 100644 --- a/web/draw.js +++ b/web/draw.js @@ -110,7 +110,15 @@ var drawLine = function(ctx, color, c1, c2) { } var drawOverlay = function(ctx, place) { - + ctx.save(); + //ctx.font = what should it equal? mind sizes on mobile + ctx.setTransform(1,0,0,1,0,0); + ctx.fillStyle = 'rgba(225,225,225,100)' + var string1 = "you placed: " + place; + var string2 = "click or press =g= to play again" + ctx.fillText(string1, 0, 100); + ctx.fillText(string2, 0, 200); // magic number... + ctx.restore(); } diff --git a/web/main.js b/web/main.js index 024b6ba..bc021a1 100644 --- a/web/main.js +++ b/web/main.js @@ -52,6 +52,7 @@ var main = function() { // starts everything, gets us going, setup ish if(status) { // add event listener if dead canvas.onclick = function(e) {location.reload()} // okay, outside of 'input' file... + canvas.onkeydown = function(e) {if(e.keyCode == '71') location.reload()}; } } -- 2.39.2