summaryrefslogtreecommitdiff
path: root/ui.js
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2021-10-05 12:37:18 +0200
committerTor Andersson <tor@ccxvii.net>2022-11-16 19:08:56 +0100
commit01ad333dd07e4bef4cf386d9373c1757f469e318 (patch)
tree59eca12ca73c6a49dbb36dcb56c5378846bbae8e /ui.js
parent2e809cf2fa9de15fd08f283b701cd1bf80c36b59 (diff)
downloadjulius-caesar-01ad333dd07e4bef4cf386d9373c1757f469e318.tar.gz
Add confirmation when clicking PASS in a battle dialog.
Diffstat (limited to 'ui.js')
-rw-r--r--ui.js7
1 files changed, 6 insertions, 1 deletions
diff --git a/ui.js b/ui.js
index 7e043e1..2198c7b 100644
--- a/ui.js
+++ b/ui.js
@@ -746,7 +746,12 @@ function select_undo() { send_action('undo'); }
function select_battle_hit(evt) { send_action('battle_hit', evt.target.block); }
function select_battle_fire(evt) { send_action('battle_fire', evt.target.block); }
function select_battle_retreat(evt) { send_action('battle_retreat', evt.target.block); }
-function select_battle_pass(evt) { send_action('battle_pass', evt.target.block); }
+
+function select_battle_pass(evt) {
+ if (window.confirm("Are you sure that you want to PASS with " + block_name(evt.target.block) + "?"))
+ send_action('battle_pass', evt.target.block);
+}
+
build_map();