diff options
author | David Vazgenovich Shakaryan <dvshakaryan@gmail.com> | 2022-05-15 02:57:37 -0700 |
---|---|---|
committer | David Vazgenovich Shakaryan <dvshakaryan@gmail.com> | 2022-05-15 02:57:37 -0700 |
commit | 72fa8e2849ab618fa66b776fd4af6d18d025fd51 (patch) | |
tree | 4c4f2590d4def44d9e239bd54068b2a9c3d8181f /web | |
parent | e7ea69b2603e7047ad13774b648dc2fb4089af6b (diff) | |
download | dartboat-72fa8e2849ab618fa66b776fd4af6d18d025fd51.tar.gz dartboat-72fa8e2849ab618fa66b776fd4af6d18d025fd51.tar.xz |
web: add back button to option menus
Diffstat (limited to 'web')
-rw-r--r-- | web/static/sw.js | 2 | ||||
-rw-r--r-- | web/web_prompt.c | 12 |
2 files changed, 13 insertions, 1 deletions
diff --git a/web/static/sw.js b/web/static/sw.js index 7576286..172cf0d 100644 --- a/web/static/sw.js +++ b/web/static/sw.js @@ -1,5 +1,5 @@ const CACHE_PREFIX = 'dartboat-' -const CACHE_VERSION = '6'; +const CACHE_VERSION = '7'; const CACHE_NAME = `${CACHE_PREFIX}${CACHE_VERSION}`; const CACHE_FILES = [ 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) |