diff --git a/.gitignore b/.gitignore index 6fc343a3c..eeeaec260 100644 --- a/.gitignore +++ b/.gitignore @@ -18,3 +18,4 @@ logs/* .idea/ *.iml remote-sync +replay diff --git a/gemp-lotr/gemp-lotr-async/src/main/web/awaiting_decision.mp3 b/gemp-lotr/gemp-lotr-async/src/main/web/awaiting_decision.mp3 new file mode 100644 index 000000000..5c3151126 Binary files /dev/null and b/gemp-lotr/gemp-lotr-async/src/main/web/awaiting_decision.mp3 differ diff --git a/gemp-lotr/gemp-lotr-async/src/main/web/fanfare_x.mp3 b/gemp-lotr/gemp-lotr-async/src/main/web/fanfare_x.mp3 new file mode 100644 index 000000000..c5a474574 Binary files /dev/null and b/gemp-lotr/gemp-lotr-async/src/main/web/fanfare_x.mp3 differ diff --git a/gemp-lotr/gemp-lotr-async/src/main/web/game.html b/gemp-lotr/gemp-lotr-async/src/main/web/game.html index b7b3317f7..ac7fa30a6 100644 --- a/gemp-lotr/gemp-lotr-async/src/main/web/game.html +++ b/gemp-lotr/gemp-lotr-async/src/main/web/game.html @@ -42,6 +42,9 @@ + + + + + diff --git a/gemp-lotr/gemp-lotr-async/src/main/web/js/gemp-022/gameUi.js b/gemp-lotr/gemp-lotr-async/src/main/web/js/gemp-022/gameUi.js index 22db5d9a1..31aed1aa1 100644 --- a/gemp-lotr/gemp-lotr-async/src/main/web/js/gemp-022/gameUi.js +++ b/gemp-lotr/gemp-lotr-async/src/main/web/js/gemp-022/gameUi.js @@ -1536,7 +1536,10 @@ var GempLotrGameUI = Class.extend({ this.smallDialog.append(but); } if (!this.replayMode) + { this.smallDialog.dialog("option", "buttons", {}); + this.PlaySound("awaitAction"); + } } this.smallDialog.dialog("open"); @@ -1798,7 +1801,10 @@ var GempLotrGameUI = Class.extend({ allowSelection(); if (!this.replayMode) + { processButtons(); + this.PlaySound("awaitAction"); + } openSizeDialog(this.cardActionDialog); this.arbitraryDialogResize(false); @@ -1940,10 +1946,18 @@ var GempLotrGameUI = Class.extend({ allowSelection(); if (!this.replayMode) + { processButtons(); + this.PlaySound("awaitAction"); + } $(':button').blur(); }, + + PlaySound: function(soundObj) { + var myAudio = document.getElementById(soundObj); + myAudio.play(); + }, createActionChoiceContextMenu: function (actions, event, selectActionFunction) { // Remove context menus that may be showing @@ -2071,7 +2085,10 @@ var GempLotrGameUI = Class.extend({ allowSelection(); if (!this.replayMode) + { processButtons(); + this.PlaySound("awaitAction"); + } openSizeDialog(this.cardActionDialog); this.arbitraryDialogResize(false); @@ -2151,7 +2168,10 @@ var GempLotrGameUI = Class.extend({ allowSelection(); if (!this.replayMode) + { processButtons(); + this.PlaySound("awaitAction"); + } }, assignMinionsDecision: function (decision) { @@ -2199,6 +2219,8 @@ var GempLotrGameUI = Class.extend({ that.clearSelection(); that.decisionFunction(id, "" + assignmentArray); + + this.PlaySound("awaitAction"); }); } diff --git a/gemp-lotr/gemp-lotr-async/src/main/web/js/gemp-022/hallUi.js b/gemp-lotr/gemp-lotr-async/src/main/web/js/gemp-022/hallUi.js index 2e7b04024..0e1f77943 100644 --- a/gemp-lotr/gemp-lotr-async/src/main/web/js/gemp-022/hallUi.js +++ b/gemp-lotr/gemp-lotr-async/src/main/web/js/gemp-022/hallUi.js @@ -397,6 +397,11 @@ var GempLotrHallUI = Class.extend({ .css({borderTopColor:"#000000", borderLeftColor:"#000000", borderBottomColor:"#000000", borderRightColor:"#000000"}) .animate({borderTopColor:"#ffffff", borderLeftColor:"#ffffff", borderBottomColor:"#ffffff", borderRightColor:"#ffffff"}, "fast"); }, + + PlaySound: function(soundObj) { + var myAudio = document.getElementById(soundObj); + myAudio.play(); + }, processHall:function (xml) { var that = this; @@ -678,12 +683,14 @@ var GempLotrHallUI = Class.extend({ window.open("/gemp-lotr/game.html?gameId=" + waitingGameId + participantIdAppend, "_blank"); } if (games.length > 0) { - var soundPlay = $(""); - this.tablesDiv.append(soundPlay); - setTimeout( - function() { - soundPlay.remove(); - }, 5000); + // var soundPlay = $(""); + // this.tablesDiv.append(soundPlay); + // setTimeout( + // function() { + // soundPlay.remove(); + // }, 5000); + + this.PlaySound("gamestart"); } if (!this.supportedFormatsInitialized) {