From 72fa8e2849ab618fa66b776fd4af6d18d025fd51 Mon Sep 17 00:00:00 2001 From: David Vazgenovich Shakaryan Date: Sun, 15 May 2022 02:57:37 -0700 Subject: web: add back button to option menus --- web/web_prompt.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'web/web_prompt.c') diff --git a/web/web_prompt.c b/web/web_prompt.c index decc1c1..f2aaa68 100644 --- a/web/web_prompt.c +++ b/web/web_prompt.c @@ -212,6 +212,7 @@ void prompt_match_opts() match_opts->p1_name : match_opts->p2_name); add_list_opt(buf); + add_list_opt("Back"); flush_list_opts(); } @@ -227,6 +228,7 @@ void prompt_match_opt_start_pts() add_list_opt("501"); add_list_opt("701"); add_list_opt("901"); + add_list_opt("Back"); flush_list_opts(); } @@ -235,6 +237,8 @@ static void match_opt_start_pts_submit(int val) if (val < 1 || val > list_optc) { oi(); return; + } else if (val == list_optc) { + goto prompt_next; } if (val == 1) @@ -246,6 +250,7 @@ static void match_opt_start_pts_submit(int val) else if (val == 4) match_opts->start_pts = 901; +prompt_next: prompt_match_opts(); prompt_flush(); } @@ -261,6 +266,7 @@ void prompt_match_opt_throws_first() add_list_opt(match_opts->p1_name); if (match_opts->p2_name) add_list_opt(match_opts->p2_name); + add_list_opt("Back"); flush_list_opts(); } @@ -269,10 +275,13 @@ static void match_opt_throws_first_submit(int val) if (val < 1 || val > list_optc) { oi(); return; + } else if (val == list_optc) { + goto prompt_next; } match_opts->throws_first = val; +prompt_next: prompt_match_opts(); prompt_flush(); } @@ -282,6 +291,9 @@ static void match_opts_submit(int val) if (val < 1 || val > list_optc) { oi(); return; + } else if (val == list_optc) { + prompt_select_mode(); + prompt_flush(); } if (val == 1) -- cgit v1.2.3-70-g09d2