A Civilization-style strategy game about governing Israel from 15 May 1948. Real ministers, real map, every fact sourced. Unity + deterministic C# sim.
HUD round 1: the info panel and the gilt trim (promo look) (#401)
Eyal Golan2b7787875faa
diff --git a/CHANGELOG.md b/CHANGELOG.mdindex 6ef0530ea..c0c46b8ec 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -196,6 +196,11 @@ adds a line under **Unreleased**; CI's `Changelog` job checks this (see `CONTRIB+0.9 ms at the gameplay zoom), not yet on an idle one.### Changed+- HUD round 1, the info panel and the trim (promo look, refs #398). Before a hex is chosen, the info panel is a one-line+ hint, not an empty block. A hex's facts (region, settlements, 1948 localities, placements) are rows with a gold sign,+ with no yields and no land-use name. When both map actions are refused for the same reason, the reason shows once,+ without buttons. The date plate, the event card, the info panel and the minimap carry the promo's filigree trim, drawn+ in code, which takes no clicks.- Map: the unit figures' uniforms are darker and warmer, so a trio stands out against the sunlit ground as promo 03'sdoes instead of khaki on khaki; a figure's slope base is painted trodden earth instead of a dark grey disc. Areadability choice at map scale; the sourced kit is unchanged (refs #197).@@ -290,6 +295,8 @@ adds a line under **Unreleased**; CI's `Changelog` job checks this (see `CONTRIBIt decodes to the same bytes, so the terrain is unchanged (#44).### Fixed+- The info panel's region line ran out of the panel and over the map; it now wraps inside the panel at every window size+ (fixes #397).- Map: kit orchard trees no longer grow through the unit figures' boots and bases. The trees under each figure drawn noware left out at draw time and come back when the figure goes (a later date, or the "units" toggle off, so plainscreenshot checkpoints keep every tree); the kits' layout does not change (fixes #249).diff --git a/docs/visual-v1.md b/docs/visual-v1.mdindex f90029e5d..2337a1960 100644--- a/docs/visual-v1.md+++ b/docs/visual-v1.md@@ -2266,3 +2266,72 @@ blocks, village houses, red-roofed villas), Jaffa 6 → 7, Tel Aviv 8 → 7.in the same session, so #320's gain stands. The 0.4 ms at diorama02 repeated in both rounds; there the far band'sstrength is 1 and the frame is pixel-identical, so it is the extra uniform read and compare per tilt-shift pixel orbuild-to-build noise, within the tilt-shift's 1.5 ms budget.++## HUD round 1: the info panel and the gilt trim (#398, #397)++Art-track gap 4, first step. The gap list and the later steps (the minimap and settlement badges; the top bar and card+head, which wait for owner rulings) are in the issue.+- The info panel: before a hex is chosen it is a one-line hint (promo 03 shows no panel until a tile is chosen). The+ hex's facts are icon rows with gold signs (`UiIcon` region, house, village, flag): the region, the settlements, the 1948+ localities and the placement. There are no yields (owner ruling) and no land-use name, because the land-use bake is+ modelled, not a sourced record. The region line wraps (#397). One refusal shared by both map actions is said once,+ without buttons, which takes the 1948 panel from about 385 to 300 px tall.+- `UiFrame.Filigree`: a second inset rule and a scroll at each corner (on a panel at least 120 px tall the scrolls also+ run down the sides). It is drawn with Painter2D on the date plate, the event card, the info panel and the minimap, and+ takes no clicks.++Allocations: GC.Alloc samples over 200 renders (`Recorder("GC.Alloc")`, a temporary probe run on both trees) were the+same on main e5bbf0f and on the branch: the info panel 15,600 and the top bar 12,800. No per-frame work is added.++Frame time, `?vprofile`, WebGL headless 1920x1080, DPR 1, `machine_lock.py --exclusive`. Two interleaved rounds per+build, main e5bbf0f against the branch on it (median avg ms, spread in brackets):++| Pose | main all | branch all | main none | branch none |+|---|---|---|---|---|+| gameplay03 | 8.09 (0.03), 8.03 (0.07) | 7.96 (0.16), 8.06 (0.06) | 5.25 (0.10), 5.32 (0.23) | 5.32 (0.04), 5.27 (0.10) |+| diorama02 | 18.87 (0.72), 19.10 (0.61) | 18.88 (0.61), 18.99 (0.59) | 12.23 (0.02), 12.33 (0.19) | 11.66 (0.32), 11.57 (0.16) |++Headed at DPR 2 (`headed.py profile --dpr 2`). The first run compared main e5bbf0f with the branch; then two+interleaved rounds compared main db99f3a with the branch merged with it. Median avg ms, then p95, main first:++| Pose, config | run 1 (e5bbf0f) | round 2 (db99f3a) | round 3 (db99f3a) |+|---|---|---|---|+| gameplay03 all | 14.61 / 14.62, p95 18 / 18 | 14.53 / 14.59, p95 18 / 18 | 14.59 / 14.56, p95 18 / 18 |+| gameplay03 none | 8.66 / 8.64, p95 14 / 14 | 8.78 / 8.40, p95 14 / 14 | 8.57 / 8.43, p95 14 / 14 |+| diorama02 all | 30.77 / 31.03, p95 36 / 40 | 30.95 / 31.26, p95 34 / 39 | 31.90 / 30.99, p95 36 / 39 |+| diorama02 none | 20.46 / 20.46, p95 23 / 22 | 21.32 / 20.69, p95 24 / 23 | 21.17 / 20.63, p95 23 / 23 |++The averages are within the spread everywhere; diorama02 has no hex chosen, so the branch draws a smaller panel. The+p95 at diorama02 `all` at DPR 2 was 3 to 5 ms higher on the branch in all three runs, so it was not noise.++**Bisect (DPR 2, diorama02 `all` p95, two interleaved rounds, main db99f3a first).** At the shot poses the event card is+closed, so variant (c) draws no visible filigree:++| Build | round 1 | round 2 |+|---|---|---|+| main | 36 | 35 |+| (a) the branch without the filigree | 36 | 36 |+| (b) only the info panel and refusal changes | 35 | 36 |+| (c) the filigree on the event card only | 35 | 36 |+| the branch (filigree on the date plate, info panel, minimap, card) | 39 | 39 |++**Cause.** The filigree drawn as Painter2D curves. An EditMode probe found no regeneration: over 120 idle frames, and+with the minimap's view box set every frame (still or moving), no `UiFrame` regenerated its mesh and no element got a+`GeometryChangedEvent`. So the cost is in drawing the curves' tessellated, antialiased geometry each frame, not in+rebuilding it.++**Fix.** `UiFrame.Ornament` rasterises the scrolls and the leaf once, in code, into a 64x64 alpha texture (two variants,+with and without the side scroll; no asset). Each corner draws one tinted, mirrored, textured quad, and the second rule+is four plain quads. The look is unchanged at 1920x1080. Re-run, DPR 2, interleaved, main db99f3a, the fix, then the old+branch (avg ms, then p95):++| Pose, config | round 1 | round 2 |+|---|---|---|+| diorama02 all | 30.78 / 30.61 / 31.29, p95 35 / 33 / 39 | 31.57 / 30.53 / 31.93, p95 36 / 34 / 38 |+| diorama02 none | 20.49 / 20.77 / 20.82, p95 23 / 24 / 23 | 21.35 / 20.35 / 21.09, p95 24 / 23 / 23 |+| gameplay03 all | 14.64 / 14.99 / 16.10, p95 18 / 23 / 23 | 14.51 / 14.53 / 14.45, p95 18 / 18 / 18 |+| gameplay03 none | 8.74 / 8.77 / 9.66, p95 14 / 14 / 17 | 8.64 / 8.67 / 8.37, p95 14 / 14 / 14 |++The fix's diorama02 `all` p95 (33, 34) is back at or under main's (35, 36). In round 1, gameplay03 `all` was disturbed+for both branch builds in the same stretch: spreads 1.36 and 1.68 against main's 0.01, and the old branch's `none` was+up too. Round 2 is clean, with all three at p95 18. `golden&smoke=5` is unchanged on the fix build.diff --git a/unity/Assets/Scripts/UI/InfoPanelPresenter.cs b/unity/Assets/Scripts/UI/InfoPanelPresenter.csindex a6d460bd8..d9992a4e3 100644--- a/unity/Assets/Scripts/UI/InfoPanelPresenter.cs+++ b/unity/Assets/Scripts/UI/InfoPanelPresenter.cs@@ -15,6 +15,12 @@ namespace Statecraft.Game.UI/// Defence screen (owner ruling, 2026-10-11).</summary>public sealed class InfoPanelPresenter : System.IDisposable{+ /// <summary>The class of a fact row (Game.uxml): a sign, then the fact's line; hidden while the line is empty.</summary>+ public const string RowClass = "info-row";+ /// <summary>On the panel while it shows a unit's card: the rows keep their lines but drop the hex signs (Statecraft.uss).</summary>+ public const string UnitClass = "info-unit";+ readonly List<(VisualElement row, Label line)> rows = new List<(VisualElement, Label)>();+readonly VisualElement panel; readonly SimBridge bridge; readonly UiText text;readonly Button campButton, housingButton, defenceButton; readonly System.Action onCamp, onHousing, onDefence;readonly System.Func<PlacedToken?> selectedUnit;@@ -43,6 +49,7 @@ namespace Statecraft.Game.UIlocalitiesLabel = panel.Q<Label>("info-localities");placement = panel.Q<Label>("info-placement"); reason = panel.Q<Label>("info-reason");thumb = panel.Q<UiIcon>("info-thumb");+ foreach (var row in panel.Query(className: RowClass).ToList()) rows.Add((row, row.Q<Label>()));campButton = panel.Q<Button>("build-camp"); housingButton = panel.Q<Button>("build-housing");onCamp = () => Build(MapActions.TransitCamp); onHousing = () => Build(MapActions.Housing);campButton.clicked += onCamp; housingButton.clicked += onHousing;@@ -139,11 +146,20 @@ namespace Statecraft.Game.UI}public void Render()+ {+ RenderLines();+ // A fact row shows only when its line has something to say (an empty row would leave a lone sign).+ foreach (var (row, line) in rows)+ row.style.display = string.IsNullOrEmpty(line.text) ? DisplayStyle.None : DisplayStyle.Flex;+ }++ void RenderLines(){var c = bridge.Content; var s = bridge.State;var camp = campButton; var housing = housingButton;var unit = unitMode ? selectedUnit() : null;defenceButton.style.display = unit != null ? DisplayStyle.Flex : DisplayStyle.None;+ panel.EnableInClassList(UnitClass, unit != null);if (unit != null){var card = UnitCard.For(unit.Value, s, text);@@ -186,8 +202,11 @@ namespace Statecraft.Game.UI// eras.yaml systems.map_actions (#58): an action the era does not allow has no button and no reasonvar allowed = c.SystemsAt(s.Date).MapActions;bool campOn = allowed.Contains(MapActions.TransitCamp), housingOn = allowed.Contains(MapActions.Housing);- camp.style.display = campOn ? DisplayStyle.Flex : DisplayStyle.None;- housing.style.display = housingOn ? DisplayStyle.Flex : DisplayStyle.None;+ // Both refused for the same reason (in 1948: "...can be placed from 1 January 1950"; or not land, too far, the+ // turn's cap): neither can be ordered on this hex now, so the reason is said once and no button shows (#398).+ bool shared = campOn && housingOn && campWhy != null && campWhy == housingWhy;+ camp.style.display = campOn && !shared ? DisplayStyle.Flex : DisplayStyle.None;+ housing.style.display = housingOn && !shared ? DisplayStyle.Flex : DisplayStyle.None;camp.SetEnabled(campOn && campWhy == null); housing.SetEnabled(housingOn && housingWhy == null);if (!campOn) campWhy = null;if (!housingOn) housingWhy = null;diff --git a/unity/Assets/Scripts/UI/UiFrame.cs b/unity/Assets/Scripts/UI/UiFrame.csindex d917be1a8..3c6991a26 100644--- a/unity/Assets/Scripts/UI/UiFrame.cs+++ b/unity/Assets/Scripts/UI/UiFrame.cs@@ -5,7 +5,8 @@ using UnityEngine.UIElements;namespace Statecraft.Game.UI{/// <summary>The promo's panel trim (promo/final/03 and 05), drawn with Painter2D over a panel: a soft shadow outside its- /// edge, a thin gold rule inset inside the border, and a gold corner bracket with a small diamond at each corner. It is+ /// edge, a thin gold rule inset inside the border, and a gold corner bracket with a small diamond at each corner; with+ /// <see cref="Filigree"/>, also a second rule and a scroll at each corner (HUD round 1, #398). It is/// an absolute overlay that fills its parent (Statecraft.uss ".ui-frame"), takes no clicks and lays nothing out, so a/// panel's layout is the same with or without it. Inside a panel that clips (overflow: hidden) the shadow is clipped/// away and only the trim shows. In UXML: <c><Statecraft.Game.UI.UiFrame /></c> as a panel's last child, so the trim is drawn over the content (the@@ -22,7 +23,9 @@ namespace Statecraft.Game.UI[UxmlAttribute] public bool Shadow { get => shadow; set { shadow = value; MarkDirtyRepaint(); } }/// <summary>False drops the inset gold rule; UXML "rule".</summary>[UxmlAttribute] public bool Rule { get => rule; set { rule = value; MarkDirtyRepaint(); } }- bool corners = true, shadow = true, rule = true;+ /// <summary>True adds the promo's filigree: a second inset rule and a scroll at each corner; UXML "filigree".</summary>+ [UxmlAttribute] public bool Filigree { get => filigree; set { filigree = value; MarkDirtyRepaint(); } }+ bool corners = true, shadow = true, rule = true, filigree;public UiFrame(){@@ -56,6 +59,12 @@ namespace Statecraft.Game.UIp.strokeColor = new Color(Gold.r, Gold.g, Gold.b, 0.30f);p.lineWidth = 1f;StrokeRect(p, new Rect(r.x + inset, r.y + inset, r.width - 2 * inset, r.height - 2 * inset));+ // The promo's double rule: a fainter second line just inside the first, as four plain quads.+ if (filigree)+ {+ const float inner = inset + FiligreeGap;+ InnerRule(mgc, new Rect(r.x + inner, r.y + inner, r.width - 2 * inner, r.height - 2 * inner), new Color(Gold.r, Gold.g, Gold.b, 0.16f));+ }}if (!corners) return;// Corner brackets over the rule, with a diamond on each corner.@@ -69,6 +78,143 @@ namespace Statecraft.Game.UIp.BeginPath(); p.MoveTo(new Vector2(cx + sx * 2.4f, cy + sy * 4f)); p.LineTo(new Vector2(cx + sx * 2.4f, cy + sy * 9f)); p.Stroke();p.BeginPath(); p.MoveTo(new Vector2(cx, cy - d)); p.LineTo(new Vector2(cx + d, cy)); p.LineTo(new Vector2(cx, cy + d)); p.LineTo(new Vector2(cx - d, cy)); p.ClosePath(); p.Fill();}+ if (filigree)+ {+ var ornament = Ornament.Get(r.height >= TallPanel);+ float size = Ornament.Units * leg / 16f;+ foreach (var (cx, cy, sx, sy) in new[] { (r.xMin + inset, r.yMin + inset, 1f, 1f), (r.xMax - inset, r.yMin + inset, -1f, 1f),+ (r.xMin + inset, r.yMax - inset, 1f, -1f), (r.xMax - inset, r.yMax - inset, -1f, -1f) })+ Ornament.Quad(mgc, ornament, cx, cy, sx, sy, size, Gold);+ }+ }++ static void InnerRule(MeshGenerationContext mgc, Rect r, Color colour)+ {+ const float w = 1f;+ Solid(mgc, new Rect(r.xMin, r.yMin, r.width, w), colour); Solid(mgc, new Rect(r.xMin, r.yMax - w, r.width, w), colour);+ Solid(mgc, new Rect(r.xMin, r.yMin + w, w, r.height - 2 * w), colour); Solid(mgc, new Rect(r.xMax - w, r.yMin + w, w, r.height - 2 * w), colour);+ }++ static void Solid(MeshGenerationContext mgc, Rect r, Color colour)+ {+ var m = mgc.Allocate(4, 6);+ foreach (var v in new[] { new Vector2(r.xMin, r.yMin), new Vector2(r.xMax, r.yMin), new Vector2(r.xMax, r.yMax), new Vector2(r.xMin, r.yMax) })+ m.SetNextVertex(new Vertex { position = new Vector3(v.x, v.y, Vertex.nearZ), tint = colour });+ m.SetNextIndex(0); m.SetNextIndex(1); m.SetNextIndex(2); m.SetNextIndex(0); m.SetNextIndex(2); m.SetNextIndex(3);+ }++ /// <summary>Below this height a panel (the date plate) gets no scroll down its sides: there the side scrolls would+ /// reach its lines of text.</summary>+ public const float TallPanel = 120f;+ /// <summary>The space between the rule and the filigree's second rule.</summary>+ public const float FiligreeGap = 3f;++ /// <summary>The promo's corner filigree (promo/final/03): from the end of each bracket leg a scroll curls back+ /// towards the panel's inside (down the sides only on a panel at least TallPanel high), and a leaf lies on the+ /// corner's diagonal. Rasterised once, in code, into a small alpha texture (no asset) and drawn as one textured quad+ /// per corner, mirrored, tinted gold and scaled with the bracket's leg. Drawn as Painter2D curves instead, the+ /// filigree cost 3-5 ms of p95 at DPR 2 on the heavy diorama02 frame (#401, bisected to the filigree); a textured+ /// quad is the cheapest thing UI Toolkit draws.</summary>+ public static class Ornament+ {+ /// <summary>The corner's extent in design units (a bracket leg is 16).</summary>+ public const float Units = 27f;+ /// <summary>The texture's side in pixels: about 2.4 pixels a unit, enough for DPR 2 at the full 16-unit leg.</summary>+ public const int Size = 64;+ static Texture2D? withSides, topOnly;++ /// <summary>The ornament texture (made on first use and kept): with the scroll down the side, or without it.</summary>+ public static Texture2D Get(bool sides)+ {+ ref var t = ref sides ? ref withSides : ref topOnly;+ if (t == null) t = Make(sides);+ return t;+ }++ /// <summary>One quad from the corner (cx, cy) inwards (sx, sy), size x size, tinted.</summary>+ public static void Quad(MeshGenerationContext mgc, Texture2D texture, float cx, float cy, float sx, float sy, float size, Color tint)+ {+ var m = mgc.Allocate(4, 6, texture);+ var uv = m.uvRegion;+ (float u, float v)[] corners = { (0, 0), (1, 0), (1, 1), (0, 1) };+ foreach (var (u, v) in corners)+ m.SetNextVertex(new Vertex+ {+ position = new Vector3(cx + sx * u * size, cy + sy * v * size, Vertex.nearZ),+ tint = tint,+ // texture row 0 is the bottom, design y grows downwards+ uv = new Vector2(uv.xMin + u * uv.width, uv.yMin + (1f - v) * uv.height),+ });+ // UI Toolkit wants clockwise triangles on screen; a quad mirrored on one axis reverses the order+ if (sx * sy > 0) { m.SetNextIndex(0); m.SetNextIndex(1); m.SetNextIndex(2); m.SetNextIndex(0); m.SetNextIndex(2); m.SetNextIndex(3); }+ else { m.SetNextIndex(0); m.SetNextIndex(2); m.SetNextIndex(1); m.SetNextIndex(0); m.SetNextIndex(3); m.SetNextIndex(2); }+ }++ /// <summary>Coverage, 2x2 supersampled, of the scroll strokes (half width 0.55 units) and the filled leaf.</summary>+ static Texture2D Make(bool sides)+ {+ var strokes = new System.Collections.Generic.List<Vector2[]>+ {+ Curve(new Vector2(16, 0), new Vector2(22, 0), new Vector2(26, 3.6f), new Vector2(23, 6.4f), new Vector2(21, 8.2f), new Vector2(18.6f, 6.6f), new Vector2(20.2f, 4.6f)),+ };+ if (sides) strokes.Add(Curve(new Vector2(0, 16), new Vector2(0, 22), new Vector2(3.6f, 26), new Vector2(6.4f, 23), new Vector2(8.2f, 21), new Vector2(6.6f, 18.6f), new Vector2(4.6f, 20.2f)));+ var leaf = Curve(new Vector2(5.2f, 5.2f), new Vector2(8.8f, 5.8f), new Vector2(10.6f, 7.6f), new Vector2(11.2f, 11.2f), new Vector2(7.6f, 10.6f), new Vector2(5.8f, 8.8f), new Vector2(5.2f, 5.2f));+ const float half = 0.55f, unitsPerPixel = Units / Size;+ var pixels = new Color32[Size * Size];+ for (int py = 0; py < Size; py++)+ for (int px = 0; px < Size; px++)+ {+ float a = 0f;+ for (int sy = 0; sy < 2; sy++)+ for (int sx = 0; sx < 2; sx++)+ {+ var q = new Vector2((px + 0.25f + 0.5f * sx) * unitsPerPixel, (py + 0.25f + 0.5f * sy) * unitsPerPixel);+ float d = float.MaxValue;+ foreach (var line in strokes) d = Mathf.Min(d, Distance(line, q));+ bool hit = d <= half || Inside(leaf, q);+ if (hit) a += 0.25f;+ }+ // design y grows downwards; texture row 0 is the bottom+ pixels[(Size - 1 - py) * Size + px] = new Color32(255, 255, 255, (byte)Mathf.RoundToInt(a * 255f));+ }+ var t = new Texture2D(Size, Size, TextureFormat.RGBA32, false) { name = sides ? "UiFrameOrnament" : "UiFrameOrnamentTop", filterMode = FilterMode.Bilinear, wrapMode = TextureWrapMode.Clamp, hideFlags = HideFlags.DontSave };+ t.SetPixels32(pixels); t.Apply(false, false);+ return t;+ }++ /// <summary>Two cubic Bezier segments (p0, c1, c2, p3, c4, c5, p6), flattened to 32 points.</summary>+ static Vector2[] Curve(params Vector2[] k)+ {+ var pts = new Vector2[33];+ for (int i = 0; i <= 32; i++)+ {+ int seg = i < 16 ? 0 : 1; float t = (i - seg * 16) / 16f; int o = seg * 3;+ float u = 1 - t;+ pts[i] = u * u * u * k[o] + 3 * u * u * t * k[o + 1] + 3 * u * t * t * k[o + 2] + t * t * t * k[o + 3];+ }+ return pts;+ }++ static float Distance(Vector2[] line, Vector2 q)+ {+ float best = float.MaxValue;+ for (int i = 0; i + 1 < line.Length; i++)+ {+ var a = line[i]; var ab = line[i + 1] - a;+ float t = Mathf.Clamp01(Vector2.Dot(q - a, ab) / Mathf.Max(ab.sqrMagnitude, 1e-6f));+ best = Mathf.Min(best, (a + t * ab - q).magnitude);+ }+ return best;+ }++ static bool Inside(Vector2[] poly, Vector2 q)+ {+ bool inside = false;+ for (int i = 0, j = poly.Length - 1; i < poly.Length; j = i++)+ if ((poly[i].y > q.y) != (poly[j].y > q.y) && q.x < (poly[j].x - poly[i].x) * (q.y - poly[i].y) / (poly[j].y - poly[i].y) + poly[i].x)+ inside = !inside;+ return inside;+ }}static void StrokeRect(Painter2D p, Rect r)diff --git a/unity/Assets/Scripts/UI/UiIcon.cs b/unity/Assets/Scripts/UI/UiIcon.csindex 2aa220863..70b525f72 100644--- a/unity/Assets/Scripts/UI/UiIcon.cs+++ b/unity/Assets/Scripts/UI/UiIcon.cs@@ -43,6 +43,7 @@ namespace Statecraft.Game.UI["coin"] = Coin, ["people"] = People, ["crowd"] = Crowd, ["shield"] = Shield, ["globe"] = Globe, ["banknote"] = Banknote,["columns"] = Columns, ["scales"] = Scales, ["helmet"] = Helmet, ["question"] = Question, ["restart"] = Restart,["chevron"] = Chevron, ["hourglass"] = Hourglass,+ ["region"] = Region, ["house"] = House, ["village"] = Village, ["flag"] = Flag,["biome-sea"] = Waves, ["biome-lake"] = Waves, ["biome-coastal_plain"] = Plain, ["biome-hills"] = Hills,["biome-mountains"] = Mountains, ["biome-valley"] = Valley, ["biome-lowland"] = Plain, ["biome-desert"] = Dunes,};@@ -259,6 +260,48 @@ namespace Statecraft.Game.UIp.BeginPath(); p.MoveTo(at(8.6f, 20)); p.LineTo(at(12, 16.4f)); p.LineTo(at(15.4f, 20)); p.ClosePath(); p.Fill();}+ // --- the info panel's fact rows (gold line art, as the promo's row signs; HUD round 1) ---+ /// <summary>The region row: a folded map of three panels.</summary>+ static void Region(Painter2D p, Func<float, float, Vector2> at, float s, Color gold)+ {+ p.strokeColor = gold; p.lineWidth = 1.4f * s;+ p.BeginPath(); p.MoveTo(at(3, 6)); p.LineTo(at(9, 3.6f)); p.LineTo(at(15, 6)); p.LineTo(at(21, 3.6f)); p.LineTo(at(21, 18.4f));+ p.LineTo(at(15, 20.8f)); p.LineTo(at(9, 18.4f)); p.LineTo(at(3, 20.8f)); p.ClosePath(); p.Stroke();+ p.lineWidth = 1f * s;+ p.BeginPath(); p.MoveTo(at(9, 3.6f)); p.LineTo(at(9, 18.4f)); p.Stroke();+ p.BeginPath(); p.MoveTo(at(15, 6)); p.LineTo(at(15, 20.8f)); p.Stroke();+ }++ /// <summary>The settlements row: a house.</summary>+ static void House(Painter2D p, Func<float, float, Vector2> at, float s, Color gold)+ {+ p.strokeColor = gold; p.lineWidth = 1.4f * s;+ p.BeginPath(); p.MoveTo(at(2.6f, 11.4f)); p.LineTo(at(12, 3.4f)); p.LineTo(at(21.4f, 11.4f)); p.Stroke();+ p.BeginPath(); p.MoveTo(at(5.4f, 9.6f)); p.LineTo(at(5.4f, 20.6f)); p.LineTo(at(18.6f, 20.6f)); p.LineTo(at(18.6f, 9.6f)); p.Stroke();+ p.fillColor = gold; Rect(p, at, 10.4f, 14.4f, 3.2f, 6.2f); p.Fill();+ }++ /// <summary>The 1948 localities row: two small flat-roofed houses, one behind the other.</summary>+ static void Village(Painter2D p, Func<float, float, Vector2> at, float s, Color gold)+ {+ p.fillColor = new Color(gold.r, gold.g, gold.b, 0.55f);+ Rect(p, at, 11.6f, 6.8f, 9.4f, 8.6f); p.Fill();+ p.fillColor = gold;+ Rect(p, at, 3, 10.6f, 11, 9.8f); p.Fill();+ p.fillColor = Navy;+ Rect(p, at, 7.4f, 15.2f, 2.4f, 5.2f); p.Fill();+ Rect(p, at, 15.4f, 9.4f, 2, 2.2f); p.Fill();+ }++ /// <summary>The placement row (an order or a built placement): a flag on a pole.</summary>+ static void Flag(Painter2D p, Func<float, float, Vector2> at, float s, Color gold)+ {+ p.strokeColor = gold; p.lineWidth = 1.5f * s;+ p.BeginPath(); p.MoveTo(at(6.4f, 21.4f)); p.LineTo(at(6.4f, 2.8f)); p.Stroke();+ p.fillColor = gold;+ p.BeginPath(); p.MoveTo(at(7.2f, 3.6f)); p.LineTo(at(19.6f, 7.6f)); p.LineTo(at(7.2f, 11.6f)); p.ClosePath(); p.Fill();+ }+// --- terrain signs for the info panel (drawn dark on the biome's own map colour) ---static readonly Color Ink = new Color32(14, 22, 38, 170), InkLight = new Color32(255, 250, 236, 220); // waves at >= 3:1 on sea and lakediff --git a/unity/Assets/Tests/EditMode/InfoPanelLayoutTests.cs b/unity/Assets/Tests/EditMode/InfoPanelLayoutTests.csnew file mode 100644index 000000000..64d3d41f8--- /dev/null+++ b/unity/Assets/Tests/EditMode/InfoPanelLayoutTests.cs@@ -0,0 +1,242 @@+#nullable enable+using System.Collections;+using System.Collections.Generic;+using System.IO;+using System.Linq;+using NUnit.Framework;+using Statecraft.Game;+using Statecraft.Game.Map;+using Statecraft.Game.UI;+using Statecraft.Sim;+using UnityEditor;+using UnityEngine;+using UnityEngine.TestTools;+using UnityEngine.UIElements;++/// <summary>HUD round 1 (#398): the info panel in the promo's shape (promo/final/03): a one-line hint before a hex is chosen,+/// the hex's facts as icon rows (only what the game models: no yields, no land-use name), its text inside the panel at+/// every window size (#397), and the panels' filigree trim, which takes no clicks.</summary>+public class InfoPanelLayoutTests+{+ static readonly Content C = ContentLoader.Load(Paths.Content);+ static UiText Text => UiText.Parse(AssetDatabase.LoadAssetAtPath<TextAsset>(UiPaths.Strings).text);+ static string MapFile(string name) => File.ReadAllText(Path.Combine(Paths.Content, "map", name));+ static MapRegions Regions() => new MapRegions(Subdistricts1948.Parse(MapFile(Subdistricts1948.FileName)), Armistice1949.Parse(MapFile(Armistice1949.FileName)));+ static Dictionary<string, string> Names() => SettlementPlacer.Parse(MapFile(SettlementPlacer.DefaultFileName)).ToDictionary(t => t.Id, t => t.Name);++ /// <summary>Every window size the HUD's tests use (UiLayoutTests, PromoHudTests, StartScreenTests) and a 16:10 laptop.</summary>+ static readonly (int w, int h)[] Windows =+ {+ (1920, 1080), (1280, 720), (1366, 768), (1760, 1000), (1920, 1200), (1440, 900), (1680, 1050), (1024, 768), (1280, 1024),+ (1024, 1024), (960, 1080), (800, 1000), (1531, 784), (2560, 1080), (1920, 900), (1600, 757), (1366, 657), (960, 600), (390, 844),+ };++ /// <summary>The real Game.uxml on the real PanelSettings at w x h, out of its loading state, with the top bar, an open event+ /// card and the info panel (with the region lines) on the session given.</summary>+ static IEnumerator Rendered(int w, int h, GameSession g, System.Action<VisualElement, InfoPanelPresenter> act, System.Action<VisualElement> check)+ {+ var rt = new RenderTexture(w, h, 0);+ var ps = Object.Instantiate(AssetDatabase.LoadAssetAtPath<PanelSettings>(UiPaths.Panel));+ ps.targetTexture = rt;+ var go = new GameObject("InfoPanelTest");+ go.SetActive(false);+ var doc = go.AddComponent<UIDocument>();+ doc.panelSettings = ps;+ doc.visualTreeAsset = AssetDatabase.LoadAssetAtPath<VisualTreeAsset>(UiPaths.GameUxml);+ go.SetActive(true);+ var root = doc.rootVisualElement;+ root.Q("root").RemoveFromClassList("loading");+ var bridge = new SimBridge(g, Text);+ var hud = new HudPresenter(root, bridge, Text);+ var card = new EventCardPresenter(root, bridge, Text, null);+ var info = new InfoPanelPresenter(root, bridge, Text, Names(), regions: Regions());+ try+ {+ act(root, info);+ for (int i = 0; i < 20 && float.IsNaN(root.Q("info-panel").worldBound.width); i++) yield return null;+ for (int i = 0; i < 3; i++) yield return null; // text measured after the first layout settles+ check(root);+ }+ finally+ {+ info.Dispose(); card.Dispose(); hud.Dispose();+ Object.DestroyImmediate(go); Object.DestroyImmediate(ps); rt.Release(); Object.DestroyImmediate(rt);+ }+ }++ /// <summary>A label's text fits its box: on one line, or wrapped within its height.</summary>+ static bool TextFits(TextElement l)+ {+ var box = l.contentRect;+ var natural = l.MeasureTextSize(l.text, 0, VisualElement.MeasureMode.Undefined, 0, VisualElement.MeasureMode.Undefined);+ if (natural.x <= box.width + 1f) return true;+ if (l.resolvedStyle.whiteSpace != WhiteSpace.Normal) return false;+ var wrapped = l.MeasureTextSize(l.text, box.width, VisualElement.MeasureMode.Exactly, 0, VisualElement.MeasureMode.Undefined);+ return wrapped.y <= box.height + 1f;+ }++ static bool Inside(Rect inner, Rect outer) =>+ inner.xMin >= outer.xMin - 0.5f && inner.xMax <= outer.xMax + 0.5f && inner.yMin >= outer.yMin - 0.5f && inner.yMax <= outer.yMax + 0.5f;++ static bool Shown(VisualElement e)+ {+ for (var x = e; x != null; x = x.parent) if (x.resolvedStyle.display == DisplayStyle.None) return false;+ return true;+ }++ /// <summary>The session one turn in, with an event open (the card shows), as a player sees it after the first End Turn.</summary>+ static GameSession WithAnEventOpen()+ {+ var g = GameSession.New(C, GoldenRun.Seed, Mode.Historical);+ for (int t = 0; g.State.PendingEvents.Count == 0; t++)+ {+ if (t >= 50) Assert.Fail("no event within 50 turns");+ g.Step(new Command[0]);+ }+ return g;+ }++ /// <summary>#397: with Lydda's hex chosen (the longest region line: "Ramle Sub-District, Lydda District (Mandate+ /// sub-districts, 1947)") and an event open, every shown label of the info panel lies inside the panel and its text fits+ /// its box, the panel lies in the window, and it overlaps neither the event column nor the minimap, at every window size.</summary>+ [UnityTest]+ public IEnumerator InfoPanelTextStaysInsideThePanel()+ {+ var g = WithAnEventOpen();+ var lod = C.SettlementHexes.Single(s => s.Id == "lod");+ var problems = new List<string>();+ foreach (var (w, h) in Windows)+ yield return Rendered(w, h, g, (root, info) => info.Show(lod.Q, lod.R), root =>+ {+ var panel = root.Q("info-panel");+ var window = root.worldBound;+ Assert.AreEqual(DisplayStyle.Flex, root.Q("event-card").resolvedStyle.display, $"{w}x{h}: precondition: an event is open");+ Assert.IsNotEmpty(root.Q<Label>("info-region").text, $"{w}x{h}: precondition: the hex names its region");+ if (!Inside(panel.worldBound, window)) problems.Add($"{w}x{h}: the panel {panel.worldBound} leaves the window {window}");+ foreach (var other in new[] { "event-card", "minimap" })+ if (panel.worldBound.Overlaps(root.Q(other).worldBound)) problems.Add($"{w}x{h}: the panel {panel.worldBound} overlaps {other} {root.Q(other).worldBound}");+ foreach (var l in panel.Query<Label>().ToList().Where(l => !string.IsNullOrEmpty(l.text) && Shown(l)))+ {+ if (!Inside(l.worldBound, panel.worldBound)) problems.Add($"{w}x{h}: '{l.text}' {l.worldBound} leaves the panel {panel.worldBound}");+ if (!TextFits(l)) problems.Add($"{w}x{h}: '{l.text}' does not fit its box {l.contentRect} ({l.name})");+ }+ });+ Assert.IsEmpty(problems, string.Join("\n", problems));+ }++ /// <summary>Before a hex is chosen the panel is a one-line hint (the promo shows no panel until a tile is chosen): no+ /// terrain sign, no rows, and no taller than the hint's line and the panel's padding.</summary>+ [UnityTest]+ public IEnumerator TheEmptyInfoPanelIsAOneLineHint()+ {+ var g = GameSession.New(C, GoldenRun.Seed, Mode.Historical);+ foreach (var (w, h) in new[] { (1920, 1080), (1280, 720), (390, 844) })+ yield return Rendered(w, h, g, (root, info) => { }, root =>+ {+ var panel = root.Q("info-panel");+ var hint = root.Q<Label>("info-title");+ Assert.AreEqual(Text["info.hint"], hint.text);+ Assert.IsTrue(TextFits(hint), $"{w}x{h}: the hint fits");+ Assert.AreEqual(DisplayStyle.None, root.Q("info-thumb").resolvedStyle.display, $"{w}x{h}: no terrain sign");+ foreach (var row in panel.Query(className: InfoPanelPresenter.RowClass).ToList())+ Assert.IsFalse(Shown(row), $"{w}x{h}: no fact row before a hex is chosen");+ var s = panel.resolvedStyle;+ var oneLine = hint.worldBound.height + hint.resolvedStyle.marginTop + hint.resolvedStyle.marginBottom+ + s.paddingTop + s.paddingBottom + s.borderTopWidth + s.borderBottomWidth;+ Assert.LessOrEqual(panel.worldBound.height, oneLine + 4f, $"{w}x{h}: the empty panel {panel.worldBound} is one line ({hint.worldBound})");+ });+ }++ /// <summary>The hex's facts in the promo's rhythm, as icon rows: the region and the settlements each sit in a row whose+ /// first child is a drawable sign; rows with nothing to say are hidden; and no tile yield appears (owner ruling).</summary>+ [UnityTest]+ public IEnumerator TheFactsAreIconRowsAndThereAreNoYields()+ {+ var g = GameSession.New(C, GoldenRun.Seed, Mode.Historical);+ var tlv = C.SettlementHexes.Single(s => s.Id == "tel_aviv");+ yield return Rendered(1920, 1080, g, (root, info) => info.Show(tlv.Q, tlv.R), root =>+ {+ foreach (var name in new[] { "info-region", "info-settlements" })+ {+ var label = root.Q<Label>(name);+ Assert.IsNotEmpty(label.text, name);+ var row = label.parent;+ Assert.IsTrue(row.ClassListContains(InfoPanelPresenter.RowClass), $"{name} sits in a fact row");+ Assert.IsTrue(Shown(row), $"{name}: its row shows");+ var sign = row.Children().First() as UiIcon;+ Assert.IsNotNull(sign, $"{name}: the row starts with its sign");+ CollectionAssert.Contains(UiIcon.Glyphs, sign!.Glyph, name);+ Assert.Less(sign.worldBound.xMax, label.worldBound.xMin + 0.5f, $"{name}: the sign is before the text");+ }+ foreach (var row in root.Q("info-panel").Query(className: InfoPanelPresenter.RowClass).ToList())+ {+ var text = row.Q<Label>()?.text ?? "";+ Assert.AreEqual(text.Length > 0, Shown(row), $"a row shows exactly when it has text ('{text}')");+ }+ var words = root.Q("info-panel").Query<Label>().ToList().Select(l => l.text).ToList();+ foreach (var yield in new[] { "Food", "Production", "Culture", "grove", "Grove" })+ Assert.IsFalse(words.Any(w => w.Contains(yield)), $"no '{yield}' in the panel (owner ruling: no yields; land use is modelled, not sourced)");+ });+ }++ /// <summary>When both map actions are refused for the same reason (in 1948: "...can be placed from 1 January 1950"), the+ /// panel says it once and shows no buttons; when they are refused for different reasons, or allowed, the buttons show.</summary>+ [Test]+ public void OneSharedRefusalShowsOnceWithoutButtons()+ {+ using var ui = new UiTestKit();+ var bridge = new SimBridge(GameSession.New(C, GoldenRun.Seed, Mode.Historical), Text);+ var info = new InfoPanelPresenter(ui.Root, bridge, Text, Names());+ var tlv = C.SettlementHexes.Single(s => s.Id == "tel_aviv");+ info.Show(tlv.Q, tlv.R);+ var why = MapActions.Check(C, bridge.State, MapActions.TransitCamp, tlv.Q, tlv.R);+ Assert.AreEqual(why, MapActions.Check(C, bridge.State, MapActions.Housing, tlv.Q, tlv.R), "precondition: one shared reason in 1948");+ Assert.AreEqual(why, ui.Q<Label>("info-reason").text, "the reason, once");+ foreach (var b in new[] { "build-camp", "build-housing" })+ {+ Assert.AreEqual(DisplayStyle.None, ui.Q<Button>(b).style.display.value, $"{b}: no button for a shared refusal");+ Assert.IsFalse(ui.Q<Button>(b).enabledSelf, $"{b} stays disabled");+ }+ info.Dispose();+ }++ /// <summary>#401's DPR-2 p95 rise was the filigree drawn as Painter2D curves. It is now one small code-made texture per+ /// variant, made once and shared by every frame and every corner: the same instance on every call, with the scroll+ /// and leaf in it (some pixels covered, most clear), and the side scroll only in the tall variant.</summary>+ [Test]+ public void TheFiligreeIsOneSharedTexturePerVariant()+ {+ var tall = UiFrame.Ornament.Get(true);+ Assert.AreSame(tall, UiFrame.Ornament.Get(true), "made once");+ var low = UiFrame.Ornament.Get(false);+ Assert.AreNotSame(tall, low);+ float Covered(Texture2D t) => t.GetPixels32().Count(p => p.a > 127) / (float)(t.width * t.height);+ Assert.Greater(Covered(low), 0.01f, "the scroll and the leaf are drawn");+ Assert.Less(Covered(tall), 0.2f, "an ornament, not a block");+ Assert.Greater(Covered(tall), Covered(low), "the tall variant adds the scroll down the side");+ }++ /// <summary>The filigree trim (promo/final/03's frames): the date plate, the event card, the info panel and the minimap carry+ /// it; it takes no clicks, so a press on a panel's corner reaches the panel, never the trim.</summary>+ [UnityTest]+ public IEnumerator FiligreeFramesTakeNoClicks()+ {+ var g = WithAnEventOpen();+ var tlv = C.SettlementHexes.Single(s => s.Id == "tel_aviv");+ yield return Rendered(1920, 1080, g, (root, info) => info.Show(tlv.Q, tlv.R), root =>+ {+ foreach (var panel in new[] { root.Q(className: "date-box"), root.Q("event-card"), root.Q("info-panel"), root.Q("minimap") })+ {+ var frame = panel.Children().OfType<UiFrame>().Single();+ Assert.IsTrue(frame.Filigree, $"{panel.name}{panel.GetClasses().FirstOrDefault()}: filigree");+ Assert.AreEqual(PickingMode.Ignore, frame.pickingMode);+ var b = panel.worldBound;+ foreach (var corner in new[] { new Vector2(b.xMin + 6, b.yMin + 6), new Vector2(b.xMax - 6, b.yMax - 6) })+ {+ var hit = root.panel.Pick(corner);+ Assert.IsFalse(hit is UiFrame, $"{panel.name}: a press at {corner} hits the trim");+ }+ }+ });+ }+}diff --git a/unity/Assets/Tests/EditMode/InfoPanelLayoutTests.cs.meta b/unity/Assets/Tests/EditMode/InfoPanelLayoutTests.cs.metanew file mode 100644index 000000000..afd02285e--- /dev/null+++ b/unity/Assets/Tests/EditMode/InfoPanelLayoutTests.cs.meta@@ -0,0 +1,2 @@+fileFormatVersion: 2+guid: 2f9207b9e30d2442a80df19c33807373\ No newline at end of filediff --git a/unity/Assets/Tests/EditMode/UiLayoutTests.cs b/unity/Assets/Tests/EditMode/UiLayoutTests.csindex 3802c790a..a7b289309 100644--- a/unity/Assets/Tests/EditMode/UiLayoutTests.cs+++ b/unity/Assets/Tests/EditMode/UiLayoutTests.cs@@ -91,7 +91,11 @@ public class UiLayoutTestsdoc.visualTreeAsset = AssetDatabase.LoadAssetAtPath<VisualTreeAsset>(UiPaths.GameUxml);go.SetActive(true);var root = doc.rootVisualElement;- var bridge = new SimBridge(GameSession.New(C, GoldenRun.Seed, Mode.Historical), Text);+ // August 1950, when the map actions are open (in 1948 one shared refusal hides both build buttons, #398), so the+ // build button below is really on the panel before a screen covers it.+ var g = GameSession.New(C, GoldenRun.Seed, Mode.Historical);+ while (g.State.Date < new System.DateTime(1950, 8, 1)) g.Step(HistoricalAI.Commands(C, g.State));+ var bridge = new SimBridge(g, Text);var info = new InfoPanelPresenter(root, bridge, Text, C.SettlementHexes.ToDictionary(x => x.Id, x => x.Id));var nav = new ScreenNav(root);try@@ -103,6 +107,8 @@ public class UiLayoutTestsvar panel = root.Q("info-panel");var build = root.Q<Button>("build-camp");Assert.AreEqual(DisplayStyle.Flex, panel.resolvedStyle.display, "precondition: the panel shows");+ Assert.AreEqual(DisplayStyle.Flex, build.resolvedStyle.display, "precondition: the build button shows");+ Assert.IsTrue(build.canGrabFocus, "precondition: the build button can take the focus before a screen covers it");foreach (var s in new[] { "cabinet", "defence" }){nav.Open(s);diff --git a/unity/Assets/UI/Game.uxml b/unity/Assets/UI/Game.uxmlindex 89b8c2dd8..c74709596 100644--- a/unity/Assets/UI/Game.uxml+++ b/unity/Assets/UI/Game.uxml@@ -13,7 +13,7 @@<ui:Label name="turn" class="muted" /><ui:Label name="date" class="muted" /></ui:VisualElement>- <Statecraft.Game.UI.UiFrame shadow="false" />+ <Statecraft.Game.UI.UiFrame shadow="false" filigree="true" /></ui:VisualElement><!-- Meter captions are the content display names in title case, a deliberate casing for captions (Treasury andForeign Currency: model.yaml money; Security and International Standing: model.yaml indicators;@@ -96,7 +96,7 @@<ui:ScrollView name="event-scroll" class="event-scroll"><ui:Label name="event-text" class="event-text" /></ui:ScrollView><ui:VisualElement name="event-options" /><ui:Label name="event-count" class="muted" />- <Statecraft.Game.UI.UiFrame />+ <Statecraft.Game.UI.UiFrame filigree="true" /></ui:VisualElement><ui:VisualElement class="right-gap" picking-mode="Ignore" /><!-- What the map's region borders show while they are drawn (owner ruling 2026-10-11: "Mandate sub-districts, 1947"). -->@@ -105,7 +105,7 @@<ui:VisualElement name="minimap-image" class="minimap-image"><ui:VisualElement name="minimap-view" class="minimap-view" picking-mode="Ignore" /></ui:VisualElement>- <Statecraft.Game.UI.UiFrame />+ <Statecraft.Game.UI.UiFrame filigree="true" /></ui:VisualElement></ui:VisualElement><ui:VisualElement name="info-panel" class="panel info-panel">@@ -114,11 +114,13 @@<ui:VisualElement class="info-body"><ui:Label name="info-title" class="title" /><ui:Label name="info-subtitle" class="muted" />- <ui:Label name="info-region" class="muted" /><ui:VisualElement class="gold-rule" />- <ui:Label name="info-settlements" />- <ui:Label name="info-localities" class="muted wrap" />- <ui:Label name="info-placement" class="muted" />+ <!-- The hex's facts as the promo's icon rows (HUD round 1, #398): a sign, then the line, which wraps (#397).+ InfoPanelPresenter hides a row with nothing to say. Only what the game models: no yields, no land-use name. -->+ <ui:VisualElement class="info-row"><Statecraft.Game.UI.UiIcon glyph="region" class="info-row-sign" /><ui:Label name="info-region" class="muted wrap info-row-text" /></ui:VisualElement>+ <ui:VisualElement class="info-row"><Statecraft.Game.UI.UiIcon glyph="house" class="info-row-sign" /><ui:Label name="info-settlements" class="wrap info-row-text" /></ui:VisualElement>+ <ui:VisualElement class="info-row"><Statecraft.Game.UI.UiIcon glyph="village" class="info-row-sign" /><ui:Label name="info-localities" class="muted wrap info-row-text" /></ui:VisualElement>+ <ui:VisualElement class="info-row"><Statecraft.Game.UI.UiIcon glyph="flag" class="info-row-sign" /><ui:Label name="info-placement" class="muted wrap info-row-text" /></ui:VisualElement><ui:VisualElement class="row"><ui:Button name="build-camp" /><ui:Button name="build-housing" />@@ -126,7 +128,7 @@</ui:VisualElement><ui:Label name="info-reason" class="reason" /></ui:VisualElement>- <Statecraft.Game.UI.UiFrame />+ <Statecraft.Game.UI.UiFrame filigree="true" /></ui:VisualElement><!-- The Cabinet as promo/final/04 (CabinetPresenter): a wide screen; the Prime Minister's card and the appointmentlist at the side; the legislature's seats (Hemicycle) with its legend above a grid of person cards. -->diff --git a/unity/Assets/UI/Statecraft.uss b/unity/Assets/UI/Statecraft.ussindex 80075897a..fcf11f1bd 100644--- a/unity/Assets/UI/Statecraft.uss+++ b/unity/Assets/UI/Statecraft.uss@@ -210,8 +210,17 @@ Button:disabled { color: var(--ink-dim); border-color: rgba(120, 120, 120, 0.4);.info-body { flex-grow: 1; flex-shrink: 1; min-width: 0; }.info-body > .row { flex-wrap: wrap; }.info-body > .row Button { margin-right: 6px; font-size: 18px; }-/* Before a hex is chosen only the hint shows (InfoPanelPresenter sets info-empty). */-.info-empty .gold-rule { display: none; }+/* Before a hex is chosen only the hint shows (InfoPanelPresenter sets info-empty): a one-line chip that hugs its text, as+ the promo shows no panel until a tile is chosen (HUD round 1, #398). */+.info-panel.info-empty { min-height: 0; width: auto; padding: 8px 16px; }+.info-empty .gold-rule, .info-empty #info-subtitle, .info-empty .reason { display: none; }+.info-empty #info-title { font-size: 20px; }+/* The hex's facts as the promo's icon rows: a gold sign, then the line, which wraps inside the panel (#397). A unit's card+ reuses the lines without the signs (they name a hex's facts, not a unit's). */+.info-row { flex-direction: row; align-items: flex-start; margin-bottom: 3px; }+.info-row-sign { width: 22px; height: 22px; flex-shrink: 0; margin: 3px 10px 0 0; }+.info-row-text { flex-grow: 1; flex-shrink: 1; min-width: 0; }+.info-unit .info-row-sign { display: none; }/* Narrow, as the country is: the frame hugs the tall map picture (MinimapPresenter fits it to the content box). *//* The border layer's label, beside the minimap's lower left: what the outlines are (MapRegions.Label). Out of the column'sflex flow (absolute), so it takes no height from the event card at any HUD tier (armistice review I-4). */