summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2024-11-24 21:45:08 +0100
committerTor Andersson <tor@ccxvii.net>2024-11-24 22:49:03 +0100
commita2e7880841587374e86468f2c06ebaae5a1cd8d4 (patch)
treea9f4e8f35001010c2319f791736964b8ad0defc4
parent5950d01753f32d4f7d1cc866bcbdda3dc07194b8 (diff)
downloadmaria-a2e7880841587374e86468f2c06ebaae5a1cd8d4.tar.gz
Revert "WIP political display at top"
This reverts commit 090b2edecbc7bb5dad76d5ed50570f6b413ff462. # Conflicts: # play.html
-rw-r--r--play.html46
-rw-r--r--play.js14
2 files changed, 31 insertions, 29 deletions
diff --git a/play.html b/play.html
index 85d064f..a231426 100644
--- a/play.html
+++ b/play.html
@@ -65,29 +65,6 @@
</div>
</div>
- <!-- Political Display -->
-
- <div id="political_panel" class="panel">
- <div id="political_header" class="panel_header">Political Display</div>
- <div id="political_body">
- <div id="political_display">
- <div id="pol_tracks"></div>
- <div class="pc_pile card_pile" id="placed_prussia"></div>
- <div class="pc_pile card_pile" id="placed_france"></div>
- <div class="pc_pile card_pile" id="placed_pragmatic"></div>
- <div class="pc_pile card_pile" id="placed_austria"></div>
- </div>
- <div style="display:flex;flex-wrap:wrap;gap:18px;margin:18px;">
- <div id="pc_deck" class="card_pile"></div>
- <div id="pc_show" style="display:flex;flex-wrap:wrap;gap:18px;">
- </div>
- </div>
- <div class="deal" id="subsidy_list"></div>
- <div class="deal" id="active_deal_list"></div>
- <div class="deal" id="proposed_deal_list"></div>
- </div>
- </div>
-
<div id="power_panel_list">
<!-- Louis XV -->
@@ -132,6 +109,29 @@
</div>
</div>
+ <!-- Political Display -->
+
+ <div id="political_panel" class="panel">
+ <div id="political_header" class="panel_header">Political Display</div>
+ <div id="political_body">
+ <div id="political_display">
+ <div id="pol_tracks"></div>
+ <div class="pc_pile card_pile" id="placed_prussia"></div>
+ <div class="pc_pile card_pile" id="placed_france"></div>
+ <div class="pc_pile card_pile" id="placed_pragmatic"></div>
+ <div class="pc_pile card_pile" id="placed_austria"></div>
+ </div>
+ <div style="display:flex;flex-wrap:wrap;gap:18px;margin:18px;">
+ <div id="pc_deck" class="card_pile"></div>
+ <div id="pc_show" style="display:flex;flex-wrap:wrap;gap:18px;">
+ </div>
+ </div>
+ <div class="deal" id="subsidy_list"></div>
+ <div class="deal" id="active_deal_list"></div>
+ <div class="deal" id="proposed_deal_list"></div>
+ </div>
+ </div>
+
</div>
<div id="discard_pile_panel" class="panel">
diff --git a/play.js b/play.js
index b01c863..b30f94a 100644
--- a/play.js
+++ b/play.js
@@ -510,21 +510,23 @@ function sort_power_panel(animate) {
let start = panel_start[params.role] | 0
if (animate)
- for (let i = 0; i < 6; ++i)
+ for (let i = 0; i < 7; ++i)
remember_position(ui.power_panel[i])
ui.power_panel_list.replaceChildren()
- for (let i = 0; i < 6; ++i) {
- let p = panel_order[(i + start) % 6]
+ for (let i = 0; i < 7; ++i) {
+ let p = panel_order[(i + start) % 7]
ui.power_panel_list.appendChild(ui.power_panel[p])
}
if (view && view.actions)
ui.power_panel_list.prepend(ui.power_panel[view.power])
+ if (view && (view.political || (view.actions && view.actions.shift)))
+ ui.power_panel_list.prepend(ui.power_panel[6])
if (animate)
- for (let i = 0; i < 6; ++i)
+ for (let i = 0; i < 7; ++i)
animate_position(ui.power_panel[i])
}
@@ -539,7 +541,6 @@ const ui = {
pieces_element: document.getElementById("pieces"),
markers_element: document.getElementById("markers"),
pol_tracks: document.getElementById("pol_tracks"),
- political_display: document.getElementById("political_panel"),
pc_deck: document.getElementById("pc_deck"),
pc_show: document.getElementById("pc_show"),
pc_placed: [
@@ -571,6 +572,7 @@ const ui = {
document.getElementById("hand_austria_panel"),
document.getElementById("hand_bavaria_panel"),
document.getElementById("hand_saxony_panel"),
+ document.getElementById("political_panel"),
],
hand: [
document.getElementById("hand_france"),
@@ -1436,7 +1438,7 @@ function on_update() {
sort_power_panel(true)
if (is_intro()) {
ui.power_panel[P_PRAGMATIC].style.display = "none"
- ui.political_display.style.display = "none"
+ ui.power_panel[6].style.display = "none"
}
for (let p = 0; p < 20; ++p)