summaryrefslogtreecommitdiff
path: root/web/web_prompt.c
diff options
context:
space:
mode:
authorDavid Vazgenovich Shakaryan <dvshakaryan@gmail.com>2022-05-02 08:18:23 -0700
committerDavid Vazgenovich Shakaryan <dvshakaryan@gmail.com>2022-05-02 08:18:23 -0700
commit09c23f60189223db58d98e49ee94df947667662d (patch)
tree3667f7639ab257e407cad689cbd4054dcc315e76 /web/web_prompt.c
parent6a4dd8790c5c98466087a5374611f72131eff958 (diff)
downloaddartboat-09c23f60189223db58d98e49ee94df947667662d.tar.gz
dartboat-09c23f60189223db58d98e49ee94df947667662d.tar.xz
web: minor cleanup of prompt code
Diffstat (limited to 'web/web_prompt.c')
-rw-r--r--web/web_prompt.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/web/web_prompt.c b/web/web_prompt.c
index abc5a05..7f65f6d 100644
--- a/web/web_prompt.c
+++ b/web/web_prompt.c
@@ -23,6 +23,22 @@ void set_prompt_mode(enum prompt_mode mode)
pm == PM_SELECT_MODE ? "select_mode" : "default");
}
+void prompt_visit()
+{
+ set_prompt_mode(PM_VISIT);
+ EM_ASM({promptMsgL($0)}, "Enter points:");
+ EM_ASM({promptMsgR($0)}, "");
+ EM_ASM({setKeyLabel($0, $1)}, "submit", "OK");
+ EM_ASM({setKeyLabel($0, $1)}, "rem", "REMAINING");
+}
+
+void prompt_bot_visit()
+{
+ set_prompt_mode(PM_DARTBOARD);
+ EM_ASM({promptMsgL($0)}, "Bot is throwing…");
+ EM_ASM({promptMsgR($0)}, "");
+}
+
void prompt_num_darts()
{
set_prompt_mode(PM_NUM_DARTS);