diff options
author | Patrick Davison <snapwilliam@gmail.com> | 2013-03-10 23:05:53 -0700 |
---|---|---|
committer | Patrick Davison <snapwilliam@gmail.com> | 2013-03-10 23:05:53 -0700 |
commit | 3eaecf134d4b50c3155d3387a3a387e236e7afcb (patch) | |
tree | ce0c6cbc76cada3bfabe815cc21298f054cfe67f | |
parent | 805a8fc305b140bc47e95a6ce4e01de0315bfe8c (diff) | |
download | pathery-3eaecf134d4b50c3155d3387a3a387e236e7afcb.tar.xz |
Chat mute-button click sound.
-rw-r--r-- | css/chat.css | 5 | ||||
-rw-r--r-- | css/maps.css | 5 | ||||
-rw-r--r-- | js/mapspecs.js | 10 | ||||
-rw-r--r-- | pages/chat.php | 10 |
4 files changed, 26 insertions, 4 deletions
diff --git a/css/chat.css b/css/chat.css index dda50eb..79354b1 100644 --- a/css/chat.css +++ b/css/chat.css @@ -24,6 +24,11 @@ top: 5px; margin-right: 5px; border-radius:5px; + + transition:background-color 0.6s ease-out; + -webkit-transition:background-color 0.6s ease-out; + -o-transition:background-color 0.6s ease-out; + -moz-transition:background-color 0.6s ease-out; } .chatMute_true { background-image: url(../images/Mute.png); diff --git a/css/maps.css b/css/maps.css index 085b273..0c18725 100644 --- a/css/maps.css +++ b/css/maps.css @@ -209,6 +209,11 @@ top: 5px;
margin-right: 5px;
border-radius:5px;
+
+ transition:background-color 0.6s ease-out;
+ -webkit-transition:background-color 0.6s ease-out;
+ -o-transition:background-color 0.6s ease-out;
+ -moz-transition:background-color 0.6s ease-out;
}
.mapMute_true {
background-image: url(../images/Mute.png);
diff --git a/js/mapspecs.js b/js/mapspecs.js index 0f9be4a..688c9dc 100644 --- a/js/mapspecs.js +++ b/js/mapspecs.js @@ -985,8 +985,14 @@ function setMute(value) {
var value = getCookie('pref_mute');
$('.mapMute').removeClass("mapMute_"+value);
- if (value == 'true') value = 'false';
- else value = 'true';
+ if (value == 'true') {
+ value = 'false';
+ soundManager.setVolume('pit', 20);
+ soundManager.setPan('pit', -60)
+ soundManager.play('pit');
+ } else {
+ value = 'true';
+ }
savePref('mute', value);
$('.mapMute').addClass("mapMute_"+value);
diff --git a/pages/chat.php b/pages/chat.php index c04f7b6..45a0700 100644 --- a/pages/chat.php +++ b/pages/chat.php @@ -244,8 +244,14 @@ function setChatMute() { var value = chatIsMuted;
$('#chatMute').removeClass("chatMute_"+value);
- if (value == 'true') value = 'false';
- else value = 'true';
+ if (value == 'true') {
+ value = 'false';
+ soundManager.setVolume('pit', 20);
+ soundManager.setPan('pit', -60)
+ soundManager.play('pit');
+ } else {
+ value = 'true';
+ }
chatIsMuted = value;
$('#chatMute').addClass("chatMute_"+value);
savePref('chatMute', value);
|