aboutsummaryrefslogtreecommitdiff
path: root/webAO/client/resetICParams.ts
blob: 414da270cc0a668bfda6b99d7e45ab0f2c2a6f2e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
import { selectedShout, setSelectedShout } from "../client";

/**
 * Resets the IC parameters for the player to enter a new chat message.
 * This should only be called when the player's previous chat message
 * was successfully sent/presented.
 */
export function resetICParams() {
    (<HTMLInputElement>document.getElementById("client_inputbox")).value = "";
    document.getElementById("button_flash")!.className = "client_button";
    document.getElementById("button_shake")!.className = "client_button";

    (<HTMLInputElement>document.getElementById("sendpreanim")).checked = false;
    (<HTMLInputElement>document.getElementById("sendsfx")).checked = false;

    if (selectedShout) {
        document.getElementById(`button_${selectedShout}`)!.className =
            "client_button";
        setSelectedShout(0);
    }
}