aboutsummaryrefslogtreecommitdiff
path: root/webAO
diff options
context:
space:
mode:
authorsD <stoned@derpymail.org>2019-12-28 17:31:22 +0100
committersD <stoned@derpymail.org>2019-12-28 17:31:22 +0100
commitbd507aba979f83d14947dc8d1ec6c8d09f9edcac (patch)
treefa33dca76c8fbf21032d5cc5e958e82901ea27a6 /webAO
parent8085841f6dd539759676566ae07125d422c86671 (diff)
Revert "Revert "Revert "no more on/off emotes"""
This reverts commit 8085841f6dd539759676566ae07125d422c86671.
Diffstat (limited to 'webAO')
-rw-r--r--webAO/client.js11
1 files changed, 6 insertions, 5 deletions
diff --git a/webAO/client.js b/webAO/client.js
index f1ac510..4e04ba5 100644
--- a/webAO/client.js
+++ b/webAO/client.js
@@ -1063,13 +1063,14 @@ class Client extends EventEmitter {
zoom: emoteinfo[3],
sfx: esfx.toLowerCase(),
sfxdelay: esfxd,
- emote_icon: AO_HOST + `characters/${encodeURI(me.name.toLowerCase())}/emotions/button${i}_on.png`
+ button_off: AO_HOST + `characters/${encodeURI(me.name.toLowerCase())}/emotions/button${i}_off.png`,
+ button_on: AO_HOST + `characters/${encodeURI(me.name.toLowerCase())}/emotions/button${i}_on.png`
};
emotesList.innerHTML +=
- `<img src=${emotes[i].emote_icon}
+ `<img src=${emotes[i].button_off}
id="emo_${i}"
alt="${emotes[i].desc}"
- class="emote_button dark"
+ class="emote_button"
onclick="pickEmotion(${i})">`;
}
pickEmotion(1);
@@ -2034,13 +2035,13 @@ window.pickChar = pickChar;
export function pickEmotion(emo) {
try {
if (client.selectedEmote !== -1) {
- document.getElementById("emo_" + client.selectedEmote).classList = "emote_button dark";
+ document.getElementById("emo_" + client.selectedEmote).src = client.emote.button_off;
}
} catch (err) {
// do nothing
}
client.selectedEmote = emo;
- document.getElementById("emo_" + emo).classList = "emote_button";
+ document.getElementById("emo_" + emo).src = client.emote.button_on;
}
window.pickEmotion = pickEmotion;