diff options
author | Tor Andersson <tor@ccxvii.net> | 2024-10-26 00:36:46 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2024-10-26 00:36:46 +0200 |
commit | 4cc31a4a900a93473f98a23a9de78ffe7001dbff (patch) | |
tree | 3cada84f253a967e0bcbde9ce37cc9da296ce554 /play.js | |
parent | ea8755f9fe54ea911cdd864c5cfc01d708bdafb4 (diff) | |
download | 1989-dawn-of-freedom-4cc31a4a900a93473f98a23a9de78ffe7001dbff.tar.gz |
show power card tooltip
Diffstat (limited to 'play.js')
-rw-r--r-- | play.js | 10 |
1 files changed, 9 insertions, 1 deletions
@@ -476,7 +476,7 @@ function sub_card_name(match, p1) { function sub_power_card_name(match, p1) { let x = p1 | 0 - return `<span class="card_name">${power_cards[x].name}</span>` + return `<span class="card_name" onmouseenter="on_focus_power_card_tip(${x})" onmouseleave="on_blur_power_card_tip()">${power_cards[x].name}</span>` } function sub_power_card_value(match, p1) { @@ -513,6 +513,14 @@ function on_blur_card_tip() { document.getElementById("tooltip").classList = "card hide" } +function on_focus_power_card_tip(card_number) { + document.getElementById("tooltip").className = "card power_" + card_number +} + +function on_blur_power_card_tip() { + document.getElementById("tooltip").classList = "card hide" +} + function on_focus_space_tip(id) { ui.spaces[id].classList.add("tip") } |