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(trueCanvas.width / 2, trueCanvas.height / 2, 6, trueCanvas.width / 2 - 25, 30, hexagonBackgroundColorClear); // drawPolygon(trueCanvas.width / 2, trueCanvas.height / 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, trueCanvas.width / 2, trueCanvas.height / 2 + (fontSizeLarge / 4)); ctx.font = fontSizeSmall + 'px Helvetica'; ctx.fillText(secondaryText, trueCanvas.width / 2, trueCanvas.height / 2 + fontSizeLarge / 4 + fontSizeSmall / 4 + 30); } function renderText(x, y, fontSize, text) { // if(typeof text == 'string' || text instanceof String) { // text = [text]; // } // fontSize = fontSize || 50; ctx.font = fontSize + 'px Roboto'; // figure out what is not working ctx.textAlign = 'center'; ctx.fillStyle = 'rgb(236, 240, 241)'; // 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); } }