diff --git a/index.html b/index.html index 2db17c8..2ca4a76 100644 --- a/index.html +++ b/index.html @@ -82,8 +82,7 @@
-
-
+
diff --git a/js_v9/input.js b/js_v9/input.js index a095099..b7431d5 100644 --- a/js_v9/input.js +++ b/js_v9/input.js @@ -75,6 +75,8 @@ function addKeyListeners() { }); $("#pauseBtn").on('touchstart mousedown', function() { + + alert("hey"); if (gameState != 1 && gameState != -1) { return; } @@ -82,7 +84,6 @@ function addKeyListeners() { if ($('#helpScreen').is(":visible")) { $('#helpScreen').fadeOut(150, "linear"); } - alert("hey"); pause(); return false; }); diff --git a/js_v9/main.js b/js_v9/main.js index 73c081b..22aa1ee 100644 --- a/js_v9/main.js +++ b/js_v9/main.js @@ -83,7 +83,7 @@ function init(b) { } infobuttonfading = true; - $("#pauseBtnInner").html(''); + $("#pauseBtn").html(''); hideUIElements(); var saveState = localStorage.getItem("saveState") || "{}"; saveState = JSONfn.parse(saveState); @@ -331,7 +331,7 @@ function showHelp() { pause(); } - if($("#pauseBtnInner").children()[0].src.replace(/^.*[\\\/]/, '') == "btn_pause.svg" && gameState != 0 && !infobuttonfading) { + if($("#pauseBtn").children()[0].src.replace(/^.*[\\\/]/, '') == "btn_pause.svg" && gameState != 0 && !infobuttonfading) { return; } diff --git a/js_v9/view.js b/js_v9/view.js index 8874a7c..9da86db 100644 --- a/js_v9/view.js +++ b/js_v9/view.js @@ -155,10 +155,10 @@ function setMainMenu() { canRestart = 's'; }, 500); $('#restartBtn').hide(); - if ($($("#pauseBtn").children()[0]).replace(/^.*[\\\/]/, '') == "btn_pause.svg") { - $("#pauseBtnInner").html(''); + if ($("#pauseBtn").replace(/^.*[\\\/]/, '') == "btn_pause.svg") { + $("#pauseBtn").attr("src","./images/btn_resume.svg"); } else { - $("#pauseBtnInner").html(''); + $("#pauseBtn").attr("src","./images/btn_pause.svg"); } } @@ -215,7 +215,6 @@ function gameOverDisplay() { } function pause(o) { - alert("pausing"); writeHighScores(); var message; if (o) { @@ -231,7 +230,7 @@ function pause(o) { $('#helpScreen').fadeOut(150, "linear"); } - $("#pauseBtnInner").html(''); + $("#pauseBtn").attr("src", "./images/btn_pause.svg"); $('.helpText').fadeOut(200, 'linear'); hideText(); hidebottombar(); @@ -246,7 +245,7 @@ function pause(o) { showText(message); } - $("#pauseBtnInner").html(''); + $("#pauseBtn").attr("src","./images/btn_resume.svg"); prevGameState = gameState; gameState = -1; }