From bd507aba979f83d14947dc8d1ec6c8d09f9edcac Mon Sep 17 00:00:00 2001 From: sD Date: Sat, 28 Dec 2019 17:31:22 +0100 Subject: Revert "Revert "Revert "no more on/off emotes""" This reverts commit 8085841f6dd539759676566ae07125d422c86671. --- webAO/client.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'webAO') 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 += - `${emotes[i].desc}`; } 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; -- cgit