diff options
| author | sD <stoned@derpymail.org> | 2020-07-09 21:03:45 +0200 |
|---|---|---|
| committer | sD <stoned@derpymail.org> | 2020-07-09 21:03:45 +0200 |
| commit | a680affb025bf469975e429b40d3e660b159f2d2 (patch) | |
| tree | 0dce29b78d330ae60835d0f1cc934f462a0807ce | |
| parent | 3fb9af3a20cf08894b7c5bbcb8aecd30140448bd (diff) | |
use only off sprite
| -rw-r--r-- | webAO/client.js | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/webAO/client.js b/webAO/client.js index 8377551..5892d3a 100644 --- a/webAO/client.js +++ b/webAO/client.js @@ -1261,11 +1261,10 @@ class Client extends EventEmitter { frame_screenshake: "", frame_realization: "", frame_sfx: "", - 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` + button: AO_HOST + `characters/${encodeURI(me.name.toLowerCase())}/emotions/button${i}_off.png` }; emotesList.innerHTML += - `<img src=${emotes[i].button_off} + `<img src=${emotes[i].button} id="emo_${i}" alt="${emotes[i].desc}" class="emote_button" @@ -2462,13 +2461,13 @@ window.pickChar = pickChar; export function pickEmotion(emo) { try { if (client.selectedEmote !== -1) { - document.getElementById("emo_" + client.selectedEmote).src = client.emote.button_off; + document.getElementById("emo_" + client.selectedEmote).classList="emote_button"; } } catch (err) { // do nothing } client.selectedEmote = emo; - document.getElementById("emo_" + emo).src = client.emote.button_on; + document.getElementById("emo_" + emo).classList="emote_button dark"; } window.pickEmotion = pickEmotion; |
