var colors = ["#e74c3c", "#f1c40f", "#3498db", "#2ecc71"]; var hexagonBackgroundColor = 'rgb(236, 240, 241)'; var hexagonBackgroundColorClear = 'rgba(236, 240, 241, 0.5)'; var centerBlue = '#2c3e50'; //tumblr? function showModal(text, secondaryText) { var buttonSize = 150; var fontSizeLarge = 50; var fontSizeSmall = 25; drawPolygon(canvas.originalWidth / 2, canvas.originalHeight / 2, 6, canvas.originalWidth / 2 - 25, 30, hexagonBackgroundColorClear); // drawPolygon(canvas.originalWidth / 2, canvas.originalHeight / 2, 6, buttonSize, 30, swegBlue); ctx.font = fontSizeLarge + 'px Helvetica'; // figure out what is not working ctx.textAlign = 'center'; ctx.fillStyle = centerBlue; // ctx.fillStyle = hexagonBackgroundColor; ctx.fillText(text, canvas.originalWidth / 2, canvas.originalHeight / 2 + (fontSizeLarge / 4)); ctx.font = fontSizeSmall + 'px Helvetica'; ctx.fillText(secondaryText, canvas.originalWidth / 2, canvas.originalHeight / 2 + fontSizeLarge / 4 + fontSizeSmall / 4 + 30); } function renderText(lines, x, y, fontSize) { if(typeof lines == 'string' || lines instanceof String) { lines = [lines]; } fontSize = fontSize || 50; ctx.font = fontSize + 'px Roboto'; // figure out what is not working ctx.textAlign = 'center'; ctx.fillStyle = 'white'; for(var i=0; i'; } return str; }); toggleClass('#highscores', 'not-visible'); } function toggleClass(element, active) { if ($(element).hasClass(active)) { $(element).removeClass(active); } else { $(element).addClass(active); } }