Added in-game decision audio.
Added an audio prompt to most in-game decision prompts, which should be low-intrusion enough to not be terribly annoying over the course of the game. This should probably be gated behind a user setting at some point.
This commit is contained in:
BIN
gemp-lotr/gemp-lotr-async/src/main/web/awaiting_decision.mp3
Normal file
BIN
gemp-lotr/gemp-lotr-async/src/main/web/awaiting_decision.mp3
Normal file
Binary file not shown.
@@ -41,6 +41,9 @@
|
||||
<script type="text/javascript" src="js/gemp-022/gameUi.js"></script>
|
||||
<script type="text/javascript" src="js/gemp-022/gameAnimations.js"></script>
|
||||
<script type="text/javascript" src="js/gemp-022/merchantUi.js"></script>
|
||||
|
||||
<!-- Audio file downloaded from https://material.io/design/sound/sound-resources.html -->
|
||||
<audio id="awaitAction" src="/gemp-lotr/awaiting_decision.mp3" type="audio/mpeg" preload="metadata"></audio>
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
@@ -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");
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user