diff options
author | Tor Andersson <tor@ccxvii.net> | 2022-05-25 02:16:29 +0200 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2023-02-18 12:31:29 +0100 |
commit | c0e0e5e1a9da05b7187fdf9a7e4ee7d3868f1a85 (patch) | |
tree | 9d54d0e105b44f49a8e7d984e63b74ce01279290 | |
parent | 2fee35b82e3c9b593fa636a2971cd6197d2020b3 (diff) | |
download | pax-pamir-c0e0e5e1a9da05b7187fdf9a7e4ee7d3868f1a85.tar.gz |
Underline active player.
-rw-r--r-- | play.css | 5 | ||||
-rw-r--r-- | play.js | 8 |
2 files changed, 8 insertions, 5 deletions
@@ -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, @@ -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; |