summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoriainp5 <iain.pearce.ip@gmail.com>2024-09-21 16:42:52 +0100
committeriainp5 <iain.pearce.ip@gmail.com>2024-09-21 16:42:52 +0100
commit49ddeaffa0db635136f00b31b94c57c1459b3d6e (patch)
treedf3a4f2f7805c87207b8f20f4737bb169281cf65
parent4a3f47395483278164201972daf36beeab605679 (diff)
download1989-dawn-of-freedom-49ddeaffa0db635136f00b31b94c57c1459b3d6e.tar.gz
New branch to work on updated display
-rw-r--r--play.html9
-rw-r--r--play.js10
2 files changed, 13 insertions, 6 deletions
diff --git a/play.html b/play.html
index 0d24f6d..3ce179a 100644
--- a/play.html
+++ b/play.html
@@ -108,7 +108,14 @@
<!-- EVENTS IN PLAY -->
<section id = "sec_events">
<div id="events_panel" class="panel hide">
- <div id="events_header" class="panel_header">Events in Play</div>
+ <div id="events_header" class="panel_header">Event Markers</div>
+ <div id="events" class="panel_body"></div>
+ </div>
+</section>
+
+<section id = "sec_table_cards">
+ <div id="table_panel" class="panel hide">
+ <div id="events_header" class="panel_header">Cards on the Table</div>
<div id="events" class="panel_body"></div>
</div>
</section>
diff --git a/play.js b/play.js
index f003f37..162fdac 100644
--- a/play.js
+++ b/play.js
@@ -239,7 +239,7 @@ let ui = {
dem_hand_count: document.getElementById("role_stat_dem"),
com_hand_count: document.getElementById("role_stat_com"),
played_card: 0,
- events_panel: document.getElementById("events_panel"),
+ table_panel: document.getElementById("table_panel"),
hand_panel: document.getElementById("hand_panel"),
turn: document.getElementById("turn-tracker"),
round: document.getElementById("action-round-tracker"),
@@ -402,18 +402,18 @@ if (view.played_card > 0) {
document.getElementById("played_card_panel").classList.add("hide")
}
-// EVENTS PANEL
+// TABLE CARDS PANEL
document.getElementById("events").replaceChildren()
if (view.table_cards.length > 0) {
- document.getElementById("events_panel").classList.remove("hide")
+ document.getElementById("table_panel").classList.remove("hide")
for (let c of view.table_cards) {
let card = ui.cards[c]
- document.getElementById("events").appendChild(card);
+ document.getElementById("table_cards").appendChild(card);
card.classList.remove("hand_card")
card.classList.add('event_card');
}
} else {
- document.getElementById("events_panel").classList.add("hide")
+ document.getElementById("table_panel").classList.add("hide")
}
// OPPONENT HAND