aboutsummaryrefslogtreecommitdiff
path: root/webAO/dom/toggleShout.ts
diff options
context:
space:
mode:
authorstonedDiscord <Tukz@gmx.de>2022-09-07 23:41:55 +0200
committerGitHub <noreply@github.com>2022-09-07 23:41:55 +0200
commit84cdbfff31c31eff9e7ba2a1d6c73f6d08ac5e43 (patch)
treefe9a18c8c0cdbf1ab8ef037af6f98a53b0ea018f /webAO/dom/toggleShout.ts
parent5362069a05b4bfbef03f37605af979aa3cf0e066 (diff)
parent3f8d0974b327e663328bc36cd97f1ba1855a2269 (diff)
Merge pull request #169 from caleb-mabry/evenMoreWindowFunctions
Added more functions
Diffstat (limited to 'webAO/dom/toggleShout.ts')
-rw-r--r--webAO/dom/toggleShout.ts5
1 files changed, 2 insertions, 3 deletions
diff --git a/webAO/dom/toggleShout.ts b/webAO/dom/toggleShout.ts
index 8094691..cb12f49 100644
--- a/webAO/dom/toggleShout.ts
+++ b/webAO/dom/toggleShout.ts
@@ -1,6 +1,5 @@
import { selectedShout, setSelectedShout } from "../client";
-
/**
* Highlights and selects a shout for in-character chat.
* If the same shout button is selected, then the shout is canceled.
@@ -9,14 +8,14 @@ import { selectedShout, setSelectedShout } from "../client";
export function toggleShout(shout: number) {
if (shout === selectedShout) {
document.getElementById(`button_${shout}`)!.className = "client_button";
- selectedShout = 0;
+ setSelectedShout(0);
} else {
document.getElementById(`button_${shout}`)!.className = "client_button dark";
if (selectedShout) {
document.getElementById(`button_${selectedShout}`)!.className =
"client_button";
}
- selectedShout = shout;
+ setSelectedShout(shout);
}
}
window.toggleShout = toggleShout;