From 0492e7ce8e27684c5331acb09ca35833bd556c01 Mon Sep 17 00:00:00 2001 From: Tor Andersson Date: Sat, 29 Apr 2023 13:50:45 +0200 Subject: Tweak stacking of highlights when mixing unit stacks and spaces. Mainly affects restoring Indians that are already at home. --- play.css | 8 ++++++-- play.js | 8 +++++++- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/play.css b/play.css index 340c9ae..b5a87a7 100644 --- a/play.css +++ b/play.css @@ -211,7 +211,7 @@ body:not(.shift) #popup #menu_discard { display: none; } background-color: black; opacity: 50%; box-shadow: 0 0 5px black; - z-index: 100; + z-index: 200; } .offmap { display: none; } @@ -221,7 +221,11 @@ body:not(.shift) #popup #menu_discard { display: none; } z-index: 200; } -body.shift .highlight { +body.shift .box.highlight, +body.shift .mountain.highlight, +body.shift .wilderness.highlight, +body.shift .cultivated.highlight +{ pointer-events: none; z-index: 0; } diff --git a/play.js b/play.js index 538e69d..45904b3 100644 --- a/play.js +++ b/play.js @@ -1065,7 +1065,13 @@ const MAXX = 2550 - 15 function layout_stack(stack, x, y, dx) { let dim = style_dims[style] - let z = (stack === focus) ? 101 : 1 + let z = 1 + if (stack === focus) + z = 201 + else + for (let [p, elt] of stack) + if (is_action_piece(p)) + z = 201 let n = stack.length if (n > 32) n = Math.ceil(n / 4) -- cgit v1.2.3