diff options
| -rw-r--r-- | webAO/client.js | 9 | ||||
| -rw-r--r-- | webAO/styles/client.css | 4 |
2 files changed, 8 insertions, 5 deletions
diff --git a/webAO/client.js b/webAO/client.js index 7f80280..cab7937 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; diff --git a/webAO/styles/client.css b/webAO/styles/client.css index f49b395..cecba80 100644 --- a/webAO/styles/client.css +++ b/webAO/styles/client.css @@ -345,6 +345,10 @@ overflow-y: hidden; } +.emote_button.dark { + opacity: 0.5; +} + #client_emo { position: relative; top: 10px; |
