From e8da7ed4da4c207769a259c7434f1e9558fe2d20 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Mon, 7 Jun 2021 16:08:16 +0200 Subject: tripoli: Tripolitanian events --- ui.js | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'ui.js') diff --git a/ui.js b/ui.js index 2a1fbc8..6071a9c 100644 --- a/ui.js +++ b/ui.js @@ -169,6 +169,7 @@ function on_update() { else document.getElementById("active_card").className = "card show tr_card_" + (game.card-27); + update_year_marker(game.year); update_season_marker(game.season); update_pieces(); update_cards(); @@ -296,6 +297,11 @@ function on_card_event() { hide_popup_menu(); } +function on_card_take() { + send_action('card_take', current_popup_card); + hide_popup_menu(); +} + function on_card_move_frigates() { send_action('card_move_frigates', current_popup_card); hide_popup_menu(); @@ -328,6 +334,7 @@ function on_click_card(evt) { } else { let menu = []; if (is_card_action('card_event', card)) menu.push('card_event'); + if (is_card_action('card_take', card)) menu.push('card_take'); if (is_card_action('card_move_frigates', card)) menu.push('card_move_frigates'); if (is_card_action('card_pirate_raid', card)) menu.push('card_pirate_raid'); if (is_card_action('card_build_gunboat', card)) menu.push('card_build_gunboat'); -- cgit v1.2.3