aboutsummaryrefslogtreecommitdiff
path: root/webAO
diff options
context:
space:
mode:
authorsD <stoned@derpymail.org>2019-12-21 18:16:21 +0100
committersD <stoned@derpymail.org>2019-12-21 18:16:21 +0100
commit772e8eb4f5869b47f2000285ecf85a0cdc06b485 (patch)
tree36eae016aeb01e0aabec5c8dad0f47ab81f72505 /webAO
parentc70873d102a669a3e39faabee37d535e65c7ea0e (diff)
correct mute ui, add pairing send to code
Diffstat (limited to 'webAO')
-rw-r--r--webAO/client.html8
-rw-r--r--webAO/client.js21
2 files changed, 20 insertions, 9 deletions
diff --git a/webAO/client.html b/webAO/client.html
index ea86a7c..5c6a97e 100644
--- a/webAO/client.html
+++ b/webAO/client.html
@@ -118,14 +118,16 @@
No judge actions available for this role.
</span>
<br>
- <span id="muting" style="display: none">
+ <span id="muting">
<label for="mute_select">Mute a character:</label>
- <select name="mute_select" id="mute_select"></select>
+ <select name="mute_select" id="mute_select" onchange="mutelist_click(event)"></select>
</span>
<br>
<span id="pairing" style="display: none">
<label for="pair_select">Pairing partner:</label>
- <select name="pair_select" id="pair_select"></select>
+ <select name="pair_select" id="pair_select">
+ <option value="-1">None</option>
+ </select>
<label for="pair_offset">Pairing offset:</label>
<input type="range" name="pair_offset" id="pair_offset" min="0" max="255" value="0">
</span>
diff --git a/webAO/client.js b/webAO/client.js
index 6437df7..8d2bb27 100644
--- a/webAO/client.js
+++ b/webAO/client.js
@@ -201,14 +201,10 @@ class Client extends EventEmitter {
* @param {number} text_color text color
* @param {string} showname custom name to be displayed (optional)
* @param {number} other_charid paired character (optional)
- * @param {string} other_name offset to paired character (optional)
- * @param {string} other_emote offset to paired character (optional)
* @param {number} self_offset offset to paired character (optional)
- * @param {number} other_offset offset to paired character (optional)
- * @param {number} other_flip offset to paired character (optional)
* @param {number} noninterrupting_preanim play the full preanim (optional)
*/
- sendIC(deskmod, speaking, name, silent, message, side, sfx_name, emote_modifier, sfx_delay, objection_modifier, evidence, flip, realization, text_color, showname, other_charid, other_name, other_emote, self_offset, other_offset, other_flip, noninterrupting_preanim) {
+ sendIC(deskmod, speaking, name, silent, message, side, sfx_name, emote_modifier, sfx_delay, objection_modifier, evidence, flip, realization, text_color, showname, other_charid, self_offset, noninterrupting_preanim) {
let extra_cccc = ``;
if (this.extrafeatures.includes("cccc_ic_support") ) {
extra_cccc = `${showname}#${other_charid}#${self_offset}#${noninterrupting_preanim}#`;
@@ -1487,6 +1483,8 @@ export function onEnter(event) {
const mycolor = document.getElementById("textcolor").value;
const showname = document.getElementById("ic_chat_name").value;
const mytext = document.getElementById("client_inputbox").value;
+ const pairchar = document.getElementById("pair_select").value;
+ const pairoffset = document.getElementById("pair_offset").value;
let sfxname = "0";
let sfxdelay = "0";
if (document.getElementById("sendsfx").checked) {
@@ -1497,7 +1495,7 @@ export function onEnter(event) {
client.sendIC("chat", myemo.speaking, mychar.name, myemo.silent,
mytext, mychar.side,
sfxname, myemo.zoom, sfxdelay, selectedShout, myevi, myflip,
- selectedEffect, mycolor, showname, -1, "", "", 0, 0, 0, 0);
+ selectedEffect, mycolor, showname, pairchar, pairoffset, 0);
}
}
window.onEnter = onEnter;
@@ -1537,6 +1535,17 @@ export function musiclist_click(_event) {
window.musiclist_click = musiclist_click;
/**
+ * Triggered when a character in the mute list is clicked
+ * @param {MouseEvent} event
+ */
+export function mutelist_click(_event) {
+ const select_character = document.getElementById("mute_select").value;
+
+ // TODO: i don't feel like writing this rn
+}
+window.musiclist_click = mutelist_click;
+
+/**
* Triggered when an item on the area list is clicked.
* @param {MouseEvent} event
*/