aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorstonedDiscord <Tukz@gmx.de>2022-11-17 22:55:36 +0100
committerstonedDiscord <Tukz@gmx.de>2022-11-17 22:55:36 +0100
commit7d3a6dc03bb284e3bb711a4a0fa698d197e585ea (patch)
tree2ff701683033a08e7e67d599fe3ee2a11d70ecf6
parent60dacea009356d2bcd36bd0dd8c95124f7a3c218 (diff)
both ini dropdown and custom
-rw-r--r--public/client.html2
-rw-r--r--webAO/dom/updateIniswap.ts18
-rw-r--r--webAO/dom/window.ts1
3 files changed, 20 insertions, 1 deletions
diff --git a/public/client.html b/public/client.html
index c1fa5bd..9f9510a 100644
--- a/public/client.html
+++ b/public/client.html
@@ -522,7 +522,7 @@
<br>
<p>Ini editing (experimental)</p>
<label for="client_iniselect">Iniedit Character:</label>
- <select id="client_iniselect" name="client_iniselect"></select>
+ <select id="client_iniselect" name="client_iniselect" onchange="updateIniswap()"></select>
<input id="client_ininame" name="client_ininame"></input>
<button id="client_inichange" onclick="iniedit()">Change</button>
<br>
diff --git a/webAO/dom/updateIniswap.ts b/webAO/dom/updateIniswap.ts
new file mode 100644
index 0000000..e040e64
--- /dev/null
+++ b/webAO/dom/updateIniswap.ts
@@ -0,0 +1,18 @@
+/**
+ * Update iniswap drowdown
+ */
+export function updateIniswap() {
+ const ini_select = <HTMLSelectElement>(
+ document.getElementById("evi_select")
+ );
+ const ini_name = <HTMLInputElement>(
+ document.getElementById("evi_filename")
+ );
+
+ if (ini_select.selectedIndex === 0) {
+ ini_filename.style.display = "initial";
+ } else {
+ ini_filename.style.display = "none";
+ }
+}
+window.updateIniswap = updateIniswap;
diff --git a/webAO/dom/window.ts b/webAO/dom/window.ts
index 956526c..0b3bd34 100644
--- a/webAO/dom/window.ts
+++ b/webAO/dom/window.ts
@@ -17,6 +17,7 @@ declare global {
changeBackgroundOOC: () => void;
updateActionCommands: (side: string) => void;
updateEvidenceIcon: () => void;
+ updateIniswap: () => void;
resizeChatbox: () => void;
setChatbox: (style: string) => void;
getIndexFromSelect: (select_box: string, value: string) => Number;