diff options
-rw-r--r-- | play.css | 2 | ||||
-rw-r--r-- | play.html | 1 | ||||
-rw-r--r-- | play.js | 5 |
3 files changed, 6 insertions, 2 deletions
@@ -435,7 +435,7 @@ body.shift .persistent_box .card:hover { z-index: 100; } -div.congress_box { +div.congress_box, div.congress_hall { position: absolute; box-sizing: border-box; } @@ -586,6 +586,7 @@ c5 3 13 7 17 8 8 2 9 3 11 12 1 5 5 12 8 16 5 8 5 8 3 22 l-3 14 -30 -1 c-35 <div id="Northeast" class="region" style="top:157px;left:880px;"></div> <div id="turn" class="piece turn" style="left:806px;top:770px;"></div> + <div id="congress_hall" class="congress_hall" style="left:560px;top:600px;width:135px;height:160px;border-top-right-radius:100px;border-top-left-radius:100px;"></div> <div id="congress_box" class="congress_box" style="left:490px;top:760px;width:270px;height:60px;"> </div> <div id="nineteenth_amendment_score" class="nineteenth_amendment_score" style="left:490px;top:760px;width:270px;height:60px;"> @@ -80,6 +80,7 @@ let ui = { favicon: document.getElementById("favicon"), status: document.getElementById("status"), turn: document.getElementById("turn"), + congress_hall: document.getElementById("congress_hall"), congress_box: document.getElementById("congress_box"), congress: [ null ], nineteenth_amendment_score: document.getElementById("nineteenth_amendment_score"), @@ -431,6 +432,7 @@ function build_user_interface() { REGIONS_LAYOUT.push(LAYOUT[r.replaceAll(' & ', '')]) } + ui.congress_hall.addEventListener("mousedown", on_click_congress) ui.congress_box.addEventListener("mousedown", on_click_congress) for (let c = 1; c <= 6; ++c) { elt = ui.congress[c] = create("div", { @@ -691,8 +693,9 @@ function on_update() { // eslint-disable-line no-unused-vars ui.turn.style.left = 806 + (42 * (view.turn - 1)) + "px" + ui.congress_hall.classList.toggle("action", is_action("congress")) ui.congress_box.replaceChildren() - ui.congress_box.classList.toggle("action", !view.congress && is_action("congress")) + ui.congress_box.classList.toggle("action", view.active === SUF_NAME && is_action("congress")) for (let c = 1; c <= view.congress; ++c) { ui.congress_box.appendChild(ui.congress[c]) ui.congress[c].classList.toggle("action", is_action("congress")) |