From 09c23f60189223db58d98e49ee94df947667662d Mon Sep 17 00:00:00 2001 From: David Vazgenovich Shakaryan Date: Mon, 2 May 2022 08:18:23 -0700 Subject: web: minor cleanup of prompt code --- web/web_prompt.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'web/web_prompt.c') 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); -- cgit v1.2.3-70-g09d2