summaryrefslogtreecommitdiff
path: root/play.js
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2024-10-27 17:00:06 +0100
committerTor Andersson <tor@ccxvii.net>2024-10-27 17:00:06 +0100
commit3e9f0e02ed19ca23970f540bca93906e9c615991 (patch)
treeec43f257ec177b1d33ea784bfa851cfc40f0ee30 /play.js
parent3535e2755451c78534919e9feb38653edbb7993d (diff)
downloadmaria-3e9f0e02ed19ca23970f540bca93906e9c615991.tar.gz
political card tooltips
Diffstat (limited to 'play.js')
-rw-r--r--play.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/play.js b/play.js
index c76d8c6..6e99804 100644
--- a/play.js
+++ b/play.js
@@ -444,6 +444,7 @@ const ui = {
prompt: document.getElementById("prompt"),
status: document.getElementById("status"),
header: document.querySelector("header"),
+ tooltip: document.getElementById("tooltip"),
spaces_element: document.getElementById("spaces"),
pieces_element: document.getElementById("pieces"),
markers_element: document.getElementById("markers"),
@@ -830,6 +831,14 @@ function on_blur_piece_tip(s) {
ui.pieces[s].classList.remove("tip")
}
+function on_focus_political_tip(c) {
+ ui.tooltip.className = "card polcard c" + c
+}
+
+function on_blur_political_tip() {
+ ui.tooltip.className = "hide"
+}
+
function on_focus_city(evt) {
ui.status.textContent = data.cities.name[evt.target.my_id]
}