summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Vazgenovich Shakaryan <dvshakaryan@gmail.com>2022-05-18 21:36:12 -0700
committerDavid Vazgenovich Shakaryan <dvshakaryan@gmail.com>2022-05-18 21:36:12 -0700
commit8956650dccfe1707005ef8be3655a4d986805312 (patch)
treec6da933dc26f94b3a3e4accb0a6a8192a7233a8c
parent5a1032e3e4b3479c84807d5610335c7e4f850158 (diff)
downloaddartboat-8956650dccfe1707005ef8be3655a4d986805312.tar.gz
dartboat-8956650dccfe1707005ef8be3655a4d986805312.tar.xz
web: display comp name in throwing prompt
-rw-r--r--web/web_control.c4
-rw-r--r--web/web_prompt.c9
-rw-r--r--web/web_prompt.h4
3 files changed, 10 insertions, 7 deletions
diff --git a/web/web_control.c b/web/web_control.c
index e89cc8f..74d42e2 100644
--- a/web/web_control.c
+++ b/web/web_control.c
@@ -21,9 +21,9 @@ void set_active_player(int pn)
scoreboard_set_player_active(pn);
if (match_player_is_comp(pn))
- prompt_bot_visit();
+ prompt_comp_visit();
else
- prompt_visit();
+ prompt_user_visit();
}
void update_user_rem_from_pts(int pts)
diff --git a/web/web_prompt.c b/web/web_prompt.c
index 9213ca0..c9e4f55 100644
--- a/web/web_prompt.c
+++ b/web/web_prompt.c
@@ -138,7 +138,7 @@ void set_prompt_mode(enum prompt_mode mode)
"visible", ".keypad");
}
-void prompt_visit()
+void prompt_user_visit()
{
set_prompt_mode(PM_VISIT);
prompt_set_msgl("Enter points:");
@@ -148,10 +148,13 @@ void prompt_visit()
dom_set_content("#key-rem", "REMAINING");
}
-void prompt_bot_visit()
+void prompt_comp_visit()
{
set_prompt_mode(PM_DARTBOARD);
- prompt_set_msgl("Computer is throwing…");
+
+ char buf[64];
+ sprintf(buf, "%s is throwing…", state_active_leg()->name);
+ prompt_set_msgl(buf);
prompt_set_msgr(NULL);
}
diff --git a/web/web_prompt.h b/web/web_prompt.h
index 2e4430b..d3facf9 100644
--- a/web/web_prompt.h
+++ b/web/web_prompt.h
@@ -8,8 +8,8 @@ void prompt_set_msgr(char *str);
void prompt_set_input(char *str);
void prompt_flush();
-void prompt_visit();
-void prompt_bot_visit();
+void prompt_user_visit();
+void prompt_comp_visit();
void prompt_num_darts();
void prompt_end_match();
void prompt_select_mode();