diff --git a/index.html b/index.html index 190eba5..20fcca6 100644 --- a/index.html +++ b/index.html @@ -31,8 +31,9 @@ - + + @@ -92,6 +93,7 @@ +
HIGH SCORE
diff --git a/js_v9/render.js b/js_v9/render.js index 3625de7..d9f753c 100644 --- a/js_v9/render.js +++ b/js_v9/render.js @@ -29,9 +29,13 @@ function render() { } MainHex.draw(); - if (gameState ==1 || gameState ==-1 || gameState === 0) { - drawScoreboard(); - } + if (gameState ==1 || gameState ==-1 || gameState === 0) { + drawScoreboard(); + } + + if (gameState != 0 && gameState != 2) { + + } for (i = 0; i < MainHex.texts.length; i++) { var alive = MainHex.texts[i].draw(); diff --git a/js_v9/view.js b/js_v9/view.js index 9da86db..b12283f 100644 --- a/js_v9/view.js +++ b/js_v9/view.js @@ -4,6 +4,7 @@ function easeOutCubic(t, b, c, d) { } function renderText(x, y, fontSize, color, text, font) { + if (text == 'HIGH SCORE') debugger; ctx.save(); if (!font) { font = 'px/0 Roboto'; diff --git a/style/fonts/Exo2-Regular.otf b/style/fonts/Exo2-Regular.otf new file mode 100644 index 0000000..b3fec6e Binary files /dev/null and b/style/fonts/Exo2-Regular.otf differ diff --git a/style/style.css b/style/style.css index 334dcdb..d2347dd 100644 --- a/style/style.css +++ b/style/style.css @@ -1,28 +1,43 @@ * { - -webkit-touch-callout: none; - -webkit-user-select: none; - -khtml-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; padding:0; margin:0; } +#HIGHSCORE { + position:absolute; + left:50%; + width:250px; + overflow: visible; + margin-left: -175px; + font-family: Exo; + +} + +@font-face { + font-family: Exo; + src: url("style/fonts/Exo2-Regular.otf") format("opentype"); +} + .tweet { - font-size:2rem; - color:#4099FF; + font-size:2rem; + color:#4099FF; } @media only screen and (min-device-width : 320px) - and (max-device-width : 480px) { - .tweet{ - font-size:1rem; - } + and (max-device-width : 480px) { + .tweet{ + font-size:1rem; + } } a { - color:#232323; + color:#232323; } .twitter-share-button { width: 90px !important; } @@ -74,44 +89,44 @@ button:focus { #openSideBar { position: fixed; - margin-top: 10px; - width:72px; - height:72px; - margin-left: 15px; + margin-top: 6px; + width:72px; + height:72px; + margin-left: 11px; z-index: 3000; color:#232323; cursor:pointer; - top:0; - left:0; - z-index:99; + top:0; + left:0; + z-index:99; } #pauseBtn { position: fixed; margin-bottom: 10px; - width:72px; - height:72px; + width:72px; + height:72px; margin-right: 15px; z-index: 3000; color:#232323; cursor:pointer; - right:0; - bottom:0; - z-index:99; + right:0; + bottom:0; + z-index:99; } #restartBtn { position: fixed; margin-bottom: 10px; - width:72px; - height:72px; + width:72px; + height:72px; margin-left: 15px; z-index: 3000; color:#232323; cursor:pointer; - bottom:0; - z-index:99; + bottom:0; + z-index:99; } #helpScreen { @@ -120,9 +135,9 @@ button:focus { z-index:3001; position:fixed; top:18px; - margin:0; - font-size:15px; - text-align:center; + margin:0; + font-size:15px; + text-align:center; display:none; color:#232323; background-color:rgba(236,240,241,.7); @@ -141,46 +156,46 @@ button:focus { cursor:pointer; } .instructions_body { - margin-left:3px; - width:calc(100% - 12px) ! important; + margin-left:3px; + width:calc(100% - 12px) ! important; } @media only screen and (min-device-width : 320px) and (max-device-width : 480px) { - #helpScreen { - position:fixed; - top:2px; - padding-top:20px; - margin:0; - width:100%; - height:100%; - font-size:13px; - text-align:center; - background-color:rgba(255,255,255,0.9); - } + #helpScreen { + position:fixed; + top:2px; + padding-top:20px; + margin:0; + width:100%; + height:100%; + font-size:13px; + text-align:center; + background-color:rgba(255,255,255,0.9); + } - .instructions_body { - /*margin-top:20px;*/ - margin-left:3px; - width:calc(100% - 12px) ! important; - } + .instructions_body { + /*margin-top:20px;*/ + margin-left:3px; + width:calc(100% - 12px) ! important; + } } .overlay { - position:absolute; - height:20%; - width:100%; - left:50%; - top:50%; - margin-left:-50%; - margin-top:-10%; - z-index:3000; - color:#232323; - text-align:center; + position:absolute; + height:20%; + width:100%; + left:50%; + top:50%; + margin-left:-50%; + margin-top:-10%; + z-index:3000; + color:#232323; + text-align:center; } .helpText { - z-index:3001; + z-index:3001; } .centeredHeader { @@ -196,105 +211,105 @@ and (max-device-width : 480px) { } .centeredSubSubHeader { - font-size:1.4rem; - text-align:center; + font-size:1.4rem; + text-align:center; } #attributions { - color:#232323; - position:absolute; - width:100%; - left: 0%; - top: 80%; - text-align:center; - font-size:1.25rem; - z-index:98; + color:#232323; + position:absolute; + width:100%; + left: 0%; + top: 80%; + text-align:center; + font-size:1.25rem; + z-index:98; } @media only screen and (min-device-width : 320px) and (max-device-width : 580px) { - .centeredHeader { - font-size:2rem; - text-align:center; - line-height:0.6rem; - } + .centeredHeader { + font-size:2rem; + text-align:center; + line-height:0.6rem; + } - #attributions { - font-size:.7rem; - } + #attributions { + font-size:.7rem; + } - .centeredSubHeader { - font-size:1rem; - text-align:center; - } + .centeredSubHeader { + font-size:1rem; + text-align:center; + } - .overlay { - margin-top: -20%; - } + .overlay { + margin-top: -20%; + } } .blur { - opacity:0.1; + opacity:0.1; } @font-face { - font-family: 'Roboto'; - font-style: normal; - font-weight: 400; - src: local('Roboto Regular'), local('Roboto-Regular'), url("fonts/roboto.woff") format('woff'); + font-family: 'Roboto'; + font-style: normal; + font-weight: 400; + src: local('Roboto Regular'), local('Roboto-Regular'), url("fonts/roboto.woff") format('woff'); } @font-face { - font-family: 'icomoon'; - font-style: normal; - font-weight: 400; - src: local('icomoon Regular'), url("fonts/icomoon.ttf"), format('ttf'); + font-family: 'icomoon'; + font-style: normal; + font-weight: 400; + src: local('icomoon Regular'), url("fonts/icomoon.ttf"), format('ttf'); } @font-face { - font-family: 'Q'; - font-style: normal; - font-weight: 400; - src: local('Q Regular'), local('Q-Regular'), url("fonts/QuattrocentoSans-Regular.ttf") format('ttf'); + font-family: 'Q'; + font-style: normal; + font-weight: 400; + src: local('Q Regular'), local('Q-Regular'), url("fonts/QuattrocentoSans-Regular.ttf") format('ttf'); } * { - padding: 0; - margin: 0; + padding: 0; + margin: 0; } body { - color: #ecf0f1; - font-family: 'Roboto', sans-serif; - background-color:#ecf0f1; + color: #ecf0f1; + font-family: 'Roboto', sans-serif; + background-color:#ecf0f1; } #clickToExit { - cursor:pointer; + cursor:pointer; } #canvas { - transition: all 0.5s ease; - position: absolute; - left:0; - right:0; + transition: all 0.5s ease; + position: absolute; + left:0; + right:0; height:100%; width:100%; - background-color:#ecf0f1; - z-index:3; + background-color:#ecf0f1; + z-index:3; } #title { - z-index:99; - margin-top:20px; - color:#2c3e50; + z-index:99; + margin-top:20px; + color:#2c3e50; } .unselectable { - -webkit-touch-callout: none; - -webkit-user-select: none; - -khtml-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; } #bottombar { @@ -303,7 +318,7 @@ body { width:1000px; text-align:center; left:50%; - margin-left:-500px; + margin-left:-500px; bottom:10px; z-index:98; }