diff options
author | Tor Andersson <tor@ccxvii.net> | 2023-11-04 12:21:35 +0100 |
---|---|---|
committer | Tor Andersson <tor@ccxvii.net> | 2023-11-04 12:26:11 +0100 |
commit | 6f4d6a42cb212ffff2e13bdde0678d7e7b56691c (patch) | |
tree | 9151f97d826dd16f3c58e9bed125192f156ad0a8 | |
parent | 8e4ac16bc804f2eeefa5fed62901c44bdb375e35 (diff) | |
download | algeria-6f4d6a42cb212ffff2e13bdde0678d7e7b56691c.tar.gz |
add extra (hidden) panel to show pool of unused units
-rw-r--r-- | play.html | 7 | ||||
-rw-r--r-- | play.js | 7 |
2 files changed, 10 insertions, 4 deletions
@@ -645,10 +645,15 @@ svg .area.tip { </div> <div id="eliminated_panel" class="panel"> - <div id="eliminated_header" class="panel_header">Eliminated / Out of Play</div> + <div id="eliminated_header" class="panel_header">Eliminated</div> <div id="eliminated" class="panel_body"></div> </div> + <div id="unused_panel" class="panel hide"> + <div id="unused_header" class="panel_header">Unused</div> + <div id="unused" class="panel_body"></div> + </div> + </section> </main> @@ -29,7 +29,7 @@ var ORAN = data.locations["ORAN"] var ALGIERS = data.locations["ALGIERS"] var CONSTANTINE = data.locations["CONSTANTINE"] -const OUT_OF_PLAY = 0 +const UNUSED = 0 const DEPLOY = 1 const ELIMINATED = 2 @@ -236,6 +236,7 @@ let ui = { fln_supply: document.getElementById("fln_supply"), gov_supply: document.getElementById("gov_supply"), eliminated: document.getElementById("eliminated"), + unused: document.getElementById("unused"), } const LAYOUT_BOX = [] @@ -767,8 +768,8 @@ function update_map() { let e = ui.units[u] let loc = unit_loc(u) switch (loc) { - case OUT_OF_PLAY: - e.remove() + case UNUSED: + ui.unused.appendChild(e) break case DEPLOY: if (is_gov_unit(u)) |