summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2022-05-25 02:16:29 +0200
committerTor Andersson <tor@ccxvii.net>2023-02-18 12:31:29 +0100
commitc0e0e5e1a9da05b7187fdf9a7e4ee7d3868f1a85 (patch)
tree9d54d0e105b44f49a8e7d984e63b74ce01279290
parent2fee35b82e3c9b593fa636a2971cd6197d2020b3 (diff)
downloadpax-pamir-c0e0e5e1a9da05b7187fdf9a7e4ee7d3868f1a85.tar.gz
Underline active player.
-rw-r--r--play.css5
-rw-r--r--play.js8
2 files changed, 8 insertions, 5 deletions
diff --git a/play.css b/play.css
index 0ba06d0..70599e4 100644
--- a/play.css
+++ b/play.css
@@ -107,10 +107,11 @@ body.shift #tooltip.focus { display: block; }
.role {
position: relative;
+ cursor: pointer;
}
-.role_name {
- cursor: pointer;
+.role.active span {
+ text-decoration: underline;
}
.role_rupees_icon,
diff --git a/play.js b/play.js
index 99c6f66..379c810 100644
--- a/play.js
+++ b/play.js
@@ -598,7 +598,7 @@ function on_update() {
ce.classList.remove("card_back");
}
- if (p == player_index[player]) {
+ if (p === player_index[player]) {
ui.player[p].gift_2.classList.toggle('action', is_place_gift_action(2));
ui.player[p].gift_4.classList.toggle('action', is_place_gift_action(4));
ui.player[p].gift_6.classList.toggle('action', is_place_gift_action(6));
@@ -623,14 +623,14 @@ function on_update() {
me.appendChild(ce);
}
- if (view.players[p].coins == 0) {
+ if (view.players[p].coins === 0) {
ui.player[p].coin.classList.add("hide");
} else {
ui.player[p].coin.classList.remove("hide");
ui.player[p].coin.textContent = view.players[p].coins;
}
- if (view.players[p].prizes == 0) {
+ if (view.players[p].prizes === 0) {
ui.player[p].prize.classList.add("hide");
} else {
ui.player[p].prize.classList.remove("hide");
@@ -640,6 +640,8 @@ function on_update() {
ui.player[p].prize.textContent = view.players[p].prizes + " prizes";
}
+ ui.player[p].role.classList.toggle("active", p === player_index[view.active])
+
ui.player[p].dial.className = "player_dial " + view.players[p].loyalty + " p" + p;
ui.player[p].role_loy_icon.className = "role_loyalty_icon " + view.players[p].loyalty;