From a28369258b89e013103edcca20355eb61fffdf69 Mon Sep 17 00:00:00 2001 From: David Vazgenovich Shakaryan Date: Wed, 4 May 2022 11:08:23 -0700 Subject: formatting --- web/web_prompt.c | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'web/web_prompt.c') diff --git a/web/web_prompt.c b/web/web_prompt.c index 814b08e..22ec4c1 100644 --- a/web/web_prompt.c +++ b/web/web_prompt.c @@ -22,7 +22,8 @@ enum prompt_mode pm; void oi() { EM_ASM({elemAddClass($0, $1)}, "#oi", "visible"); - oi_timeout = EM_ASM_INT({return scheduleCCall($0, $1)}, "clear_oi", 3000); + oi_timeout = EM_ASM_INT({return scheduleCCall($0, $1)}, + "clear_oi", 3000); } EMSCRIPTEN_KEEPALIVE @@ -102,8 +103,9 @@ void set_prompt_mode(enum prompt_mode mode) EM_ASM({elemRemoveClass($0, $1)}, "#prompt", "active"); EM_ASM({elemSetUniqClass($0, $1, $2)}, - (pm == PM_DARTBOARD ? "#keypad-dartboard" : - pm == PM_SELECT_MODE ? "#keypad-select_mode" : "#keypad-default"), + pm == PM_DARTBOARD ? "#keypad-dartboard" : + pm == PM_SELECT_MODE ? "#keypad-select_mode" : + "#keypad-default", "visible", ".keypad"); } @@ -137,8 +139,8 @@ void prompt_end_match() scoreboard_set_player_active(-1); // sets all inactive set_prompt_mode(PM_END_MATCH); prompt_set_msgl( - state->mode == M_PVC && state->legs[1]->rem <= 0 ? "Bot wins. :(" : - "You win! :)"); + state->mode == M_PVC && state->legs[1]->rem <= 0 ? + "Bot wins. :(" : "You win! :)"); prompt_set_msgr(NULL); EM_ASM({elemSetContent($0, $1)}, "#key-submit", "END MATCH"); EM_ASM({elemSetContent($0, $1)}, "#key-rem", "REMATCH"); @@ -180,7 +182,8 @@ void deactivate_key(char *k) char *prompt_get() { - return (char *)EM_ASM_INT({return elemGetContent($0)}, "#prompt-input"); + return (char *)EM_ASM_INT({return elemGetContent($0)}, + "#prompt-input"); } void prompt_handle_pre(char *command) -- cgit v1.2.3-70-g09d2