summaryrefslogtreecommitdiff
path: root/play.js
diff options
context:
space:
mode:
authorTor Andersson <tor@ccxvii.net>2024-11-23 23:57:21 +0100
committerTor Andersson <tor@ccxvii.net>2024-11-23 23:57:35 +0100
commit090b2edecbc7bb5dad76d5ed50570f6b413ff462 (patch)
treecf9ff34e41affd951a3ebcbcae1b3561e86988f3 /play.js
parent1d4a75ac24781f07d152199a5ec1468d8bcb0585 (diff)
downloadmaria-090b2edecbc7bb5dad76d5ed50570f6b413ff462.tar.gz
WIP political display at top
Diffstat (limited to 'play.js')
-rw-r--r--play.js14
1 files changed, 6 insertions, 8 deletions
diff --git a/play.js b/play.js
index e2238ba..c8bcaeb 100644
--- a/play.js
+++ b/play.js
@@ -504,23 +504,21 @@ function sort_power_panel(animate) {
let start = panel_start[params.role] | 0
if (animate)
- for (let i = 0; i < 7; ++i)
+ for (let i = 0; i < 6; ++i)
remember_position(ui.power_panel[i])
ui.power_panel_list.replaceChildren()
- for (let i = 0; i < 7; ++i) {
- let p = panel_order[(i + start) % 7]
+ for (let i = 0; i < 6; ++i) {
+ let p = panel_order[(i + start) % 6]
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 < 7; ++i)
+ for (let i = 0; i < 6; ++i)
animate_position(ui.power_panel[i])
}
@@ -535,6 +533,7 @@ 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: [
@@ -566,7 +565,6 @@ 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"),
@@ -1432,7 +1430,7 @@ function on_update() {
sort_power_panel(true)
if (is_intro()) {
ui.power_panel[P_PRAGMATIC].style.display = "none"
- ui.power_panel[6].style.display = "none"
+ ui.political_display.style.display = "none"
}
for (let p = 0; p < 20; ++p)