diff options
author | Tor Andersson <tor@ccxvii.net> | 2021-10-05 12:37:18 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2022-11-16 19:08:56 +0100 |
commit | 01ad333dd07e4bef4cf386d9373c1757f469e318 (patch) | |
tree | 59eca12ca73c6a49dbb36dcb56c5378846bbae8e /ui.js | |
parent | 2e809cf2fa9de15fd08f283b701cd1bf80c36b59 (diff) | |
download | julius-caesar-01ad333dd07e4bef4cf386d9373c1757f469e318.tar.gz |
Add confirmation when clicking PASS in a battle dialog.
Diffstat (limited to 'ui.js')
-rw-r--r-- | ui.js | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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(); |