A Civilization-style strategy game about governing Israel from 15 May 1948. Real ministers, real map, every fact sourced. Unity + deterministic C# sim.
ui: restyle the HUD and screens to the promo's interface
eyalgoland28e5a2d252a
diff --git a/unity/Assets/Scripts/UI/EventCardPresenter.cs b/unity/Assets/Scripts/UI/EventCardPresenter.csindex f17710ca7..81f67c5f7 100644--- a/unity/Assets/Scripts/UI/EventCardPresenter.cs+++ b/unity/Assets/Scripts/UI/EventCardPresenter.cs@@ -12,6 +12,8 @@ namespace Statecraft.Game.UI{/// <summary>The portrait thumbnail's size in the card (Statecraft.uss .event-image).</summary>public const float PortraitWidth = 96f, PortraitHeight = 128f;+ /// <summary>The class on each option button (Statecraft.uss).</summary>+ public const string OptionClass = "event-option";readonly VisualElement card; readonly SimBridge bridge; readonly UiText text; readonly PortraitCatalog? portraits;@@ -57,11 +59,20 @@ namespace Statecraft.Game.UI{var option = o;var b = new Button(() => Choose(e, option)) { name = "option-" + o.Id, text = Cabinet.Fill(c, s, o.Text, date) };+ b.AddToClassList(OptionClass);+ b.generateVisualContent += PaintSign; // the promo's round sign at the option's leftoptions.Add(b);}card.Q<Label>("event-count").text = open.Count > 1 ? text.Format("event.more", open.Count - 1) : "";}+ /// <summary>The round sign in an option's left padding (Statecraft.uss .event-option), painted into the button so it+ /// stays a leaf whose wrapped text Yoga measures (UiIcon.Paint).</summary>+ public const float SignRadius = 15f, SignLeft = 9f;++ static void PaintSign(MeshGenerationContext m) =>+ UiIcon.PaintDisc(m, "chevron", new UnityEngine.Vector2(SignLeft + SignRadius, m.visualElement.layout.height / 2f), SignRadius);+void Choose(GameEvent e, EventOption o){// The bridge raises Refused (the toast shows it) or Changed (the toast clears); nothing more to do here.diff --git a/unity/Assets/Scripts/UI/HudPresenter.cs b/unity/Assets/Scripts/UI/HudPresenter.csindex 7e3c8cbf9..526f141be 100644--- a/unity/Assets/Scripts/UI/HudPresenter.cs+++ b/unity/Assets/Scripts/UI/HudPresenter.cs@@ -8,6 +8,12 @@ namespace Statecraft.Game.UI{readonly VisualElement root; readonly SimBridge bridge; readonly UiText text;readonly Button endTurn; readonly System.Action onEndTurn;+ readonly VisualElement bar;++ /// <summary>Below this top-bar width (logical px) the meters drop their icons (Statecraft.uss .top-bar--compact): six+ /// meters with icons, the date badge, the screen buttons and End Turn need about this much.</summary>+ public const float CompactBelowPx = 1800f;+ public const string CompactClass = "top-bar--compact";public HudPresenter(VisualElement root, SimBridge bridge, UiText text){@@ -15,12 +21,30 @@ namespace Statecraft.Game.UIendTurn = root.Q<Button>("end-turn");onEndTurn = () => bridge.EndTurn();endTurn.clicked += onEndTurn;+ endTurn.generateVisualContent += PaintHourglass;+ bar = root.Q<VisualElement>("top-bar");+ bar.RegisterCallback<GeometryChangedEvent>(OnBarGeometry);+ SetCompact(bar.layout.width); // the bar may already be laid out (the loading screen shows it) and never resizebridge.Changed += Render;Render();}/// <summary>Unsubscribes from the bridge and the button (the owner calls this when it is disabled).</summary>- public void Dispose() { bridge.Changed -= Render; endTurn.clicked -= onEndTurn; }+ public void Dispose()+ {+ bridge.Changed -= Render; endTurn.clicked -= onEndTurn; endTurn.generateVisualContent -= PaintHourglass;+ bar.UnregisterCallback<GeometryChangedEvent>(OnBarGeometry);+ }++ // The bar's width does not depend on the class, so this settles in one pass.+ void OnBarGeometry(GeometryChangedEvent e) => SetCompact(e.newRect.width);++ void SetCompact(float width) { if (width > 0) bar.EnableInClassList(CompactClass, width < CompactBelowPx); } // NaN before layout: wait for it++ /// <summary>End Turn's hourglass, in the button's left padding (Statecraft.uss .end-turn), painted into the button so it+ /// stays a leaf sized by its text (UiIcon.Paint).</summary>+ static void PaintHourglass(MeshGenerationContext m) =>+ UiIcon.Paint(m, "hourglass", new UnityEngine.Rect(10f, (m.visualElement.layout.height - 22f) / 2f, 22f, 22f));void Set(string name, string value) => root.Q<Label>(name).text = value;diff --git a/unity/Assets/Scripts/UI/InfoPanelPresenter.cs b/unity/Assets/Scripts/UI/InfoPanelPresenter.csindex 69a8603b1..a103aec9b 100644--- a/unity/Assets/Scripts/UI/InfoPanelPresenter.cs+++ b/unity/Assets/Scripts/UI/InfoPanelPresenter.cs@@ -1,6 +1,7 @@#nullable enableusing System.Collections.Generic;using System.Linq;+using Statecraft.Game.Map;using Statecraft.Sim;using UnityEngine.UIElements;@@ -14,6 +15,7 @@ namespace Statecraft.Game.UIreadonly VisualElement panel; readonly SimBridge bridge; readonly UiText text;readonly Button campButton, housingButton; readonly System.Action onCamp, onHousing;readonly Label title, subtitle, settlements, placement, reason;+ readonly UiIcon thumb;readonly IReadOnlyDictionary<string, string> settlementNames;public InfoPanelPresenter(VisualElement root, SimBridge bridge, UiText text, IReadOnlyDictionary<string, string> settlementNames)@@ -22,6 +24,7 @@ namespace Statecraft.Game.UIthis.settlementNames = settlementNames;title = panel.Q<Label>("info-title"); subtitle = panel.Q<Label>("info-subtitle"); settlements = panel.Q<Label>("info-settlements");placement = panel.Q<Label>("info-placement"); reason = panel.Q<Label>("info-reason");+ thumb = panel.Q<UiIcon>("info-thumb");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;@@ -43,19 +46,32 @@ namespace Statecraft.Game.UIbridge.Queue(new MapAction(action, Selected.Value.q, Selected.Value.r));}+ /// <summary>The terrain sign: the biome's glyph on the biome's own map colour (MapBuilder.BiomeColours), hidden when no+ /// hex (or no hex on the map) is selected.</summary>+ void ShowThumb(string? biome)+ {+ var known = biome != null && MapBuilder.BiomeColours.ContainsKey(biome);+ thumb.style.display = known ? DisplayStyle.Flex : DisplayStyle.None;+ thumb.Glyph = known ? "biome-" + biome : "";+ thumb.style.backgroundColor = known ? new StyleColor(MapBuilder.BiomeColours[biome!]) : new StyleColor(StyleKeyword.Null);+ }+public void Render(){var c = bridge.Content; var s = bridge.State;var camp = campButton; var housing = housingButton;+ panel.EnableInClassList("info-empty", Selected == null);if (Selected == null){title.text = text["info.hint"];subtitle.text = settlements.text = placement.text = reason.text = "";camp.style.display = DisplayStyle.None; housing.style.display = DisplayStyle.None;+ ShowThumb(null);return;}var (q, r) = Selected.Value;var hex = c.HexAt(q, r);+ ShowThumb(hex?.Biome);var owned = c.SettlementHexes.Where(x => x.Q == q && x.R == r).Select(x => settlementNames[x.Id]).ToList(); // strict: every settlement hex has a name (final review M4)title.text = owned.Count > 0 ? owned[0] : hex == null ? text["info.off_map"] : text["info.biome." + hex.Biome];subtitle.text = hex == null ? "" : text.Format("info.hex", text["info.biome." + hex.Biome], hex.ElevM); // no debug coordinates in player text (playtest 2, P2-6)diff --git a/unity/Assets/Scripts/UI/MinimapPresenter.cs b/unity/Assets/Scripts/UI/MinimapPresenter.csindex 8ae8c3c66..27ba4e804 100644--- a/unity/Assets/Scripts/UI/MinimapPresenter.cs+++ b/unity/Assets/Scripts/UI/MinimapPresenter.cs@@ -69,7 +69,7 @@ namespace Statecraft.Game.UIvar biome = new System.Collections.Generic.Dictionary<(int, int), string>();foreach (var h in hexes.hexes) biome[(h.q, h.r)] = h.biome;var b = hexes.bounds;- var tex = new Texture2D(width, height, TextureFormat.RGB24, false) { name = "Minimap", filterMode = FilterMode.Point, wrapMode = TextureWrapMode.Clamp };+ var tex = new Texture2D(width, height, TextureFormat.RGB24, false) { name = "Minimap", filterMode = FilterMode.Bilinear, wrapMode = TextureWrapMode.Clamp };var pixels = new Color[width * height];for (int y = 0; y < height; y++)for (int x = 0; x < width; x++)diff --git a/unity/Assets/Scripts/UI/ScreenNav.cs b/unity/Assets/Scripts/UI/ScreenNav.csindex f6da014f5..ff9531981 100644--- a/unity/Assets/Scripts/UI/ScreenNav.cs+++ b/unity/Assets/Scripts/UI/ScreenNav.cs@@ -11,6 +11,8 @@ namespace Statecraft.Game.UIpublic sealed class ScreenNav : System.IDisposable{public static readonly string[] Screens = { "cabinet", "budget", "defence", "why" };+ /// <summary>The class on the open screen's button (Statecraft.uss lights its ring).</summary>+ public const string OpenClass = "nav-open";readonly VisualElement root;readonly List<(Button, System.Action)> hooks = new List<(Button, System.Action)>();@@ -43,7 +45,10 @@ namespace Statecraft.Game.UI{Current = screen;foreach (var s in Screens)+ {root.Q<VisualElement>("screen-" + s).style.display = s == screen ? DisplayStyle.Flex : DisplayStyle.None;+ root.Q<Button>("nav-" + s).EnableInClassList(OpenClass, s == screen); // the open screen's button is lit+ }}}}diff --git a/unity/Assets/Scripts/UI/UiFrame.cs b/unity/Assets/Scripts/UI/UiFrame.csnew file mode 100644index 000000000..b156173e8--- /dev/null+++ b/unity/Assets/Scripts/UI/UiFrame.cs@@ -0,0 +1,79 @@+#nullable enable+using UnityEngine;+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+ /// 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 first child.</summary>+ [UxmlElement]+ public partial class UiFrame : VisualElement+ {+ public const string ClassName = "ui-frame";+ static readonly Color Gold = new Color32(196, 160, 92, 255);++ /// <summary>False drops the corner brackets (a slim bar keeps only the rule and the shadow); UXML "corners".</summary>+ [UxmlAttribute] public bool Corners { get => corners; set { corners = value; MarkDirtyRepaint(); } }+ /// <summary>False drops the outer shadow; UXML "shadow".</summary>+ [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;++ public UiFrame()+ {+ AddToClassList(ClassName);+ pickingMode = PickingMode.Ignore;+ generateVisualContent += Draw;+ }++ void Draw(MeshGenerationContext mgc)+ {+ var r = new Rect(0, 0, layout.width, layout.height);+ if (!(r.width > 8) || !(r.height > 8)) return;+ var p = mgc.painter2D;+ p.lineJoin = LineJoin.Miter;+ if (shadow)+ {+ // Rings outside the parent's 1 px border, fading out over 12 px and weighted downwards (light from above).+ for (int i = 1; i <= 12; i++)+ {+ var t = 1f - i / 13f;+ p.strokeColor = new Color(0f, 0f, 0f, 0.20f * t * t);+ p.lineWidth = 1.05f;+ var g = 1f + i;+ StrokeRect(p, new Rect(r.x - g, r.y - g + i * 0.25f, r.width + 2 * g, r.height + 2 * g + i * 0.25f));+ }+ }+ // The inner rule.+ const float inset = 4f;+ if (rule)+ {+ p.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));+ }+ if (!corners) return;+ // Corner brackets over the rule, with a diamond on each corner.+ float leg = Mathf.Min(16f, Mathf.Min(r.width, r.height) / 4f), d = 2.6f;+ p.strokeColor = Gold; p.lineWidth = 1.6f; p.fillColor = Gold;+ 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) })+ {+ p.BeginPath(); p.MoveTo(new Vector2(cx + sx * leg, cy)); p.LineTo(new Vector2(cx, cy)); p.LineTo(new Vector2(cx, cy + sy * leg)); p.Stroke();+ p.BeginPath(); p.MoveTo(new Vector2(cx + sx * 4f, cy + sy * 2.4f)); p.LineTo(new Vector2(cx + sx * 9f, cy + sy * 2.4f)); p.Stroke();+ p.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();+ }+ }++ static void StrokeRect(Painter2D p, Rect r)+ {+ p.BeginPath(); p.MoveTo(new Vector2(r.xMin, r.yMin)); p.LineTo(new Vector2(r.xMax, r.yMin)); p.LineTo(new Vector2(r.xMax, r.yMax));+ p.LineTo(new Vector2(r.xMin, r.yMax)); p.ClosePath(); p.Stroke();+ }+ }+}diff --git a/unity/Assets/Scripts/UI/UiFrame.cs.meta b/unity/Assets/Scripts/UI/UiFrame.cs.metanew file mode 100644index 000000000..988f7c86b--- /dev/null+++ b/unity/Assets/Scripts/UI/UiFrame.cs.meta@@ -0,0 +1,2 @@+fileFormatVersion: 2+guid: 615240912e89e41fa9e996e04a3be1c9\ No newline at end of filediff --git a/unity/Assets/Scripts/UI/UiIcon.cs b/unity/Assets/Scripts/UI/UiIcon.csnew file mode 100644index 000000000..7bfad5007--- /dev/null+++ b/unity/Assets/Scripts/UI/UiIcon.cs@@ -0,0 +1,309 @@+#nullable enable+using System;+using System.Collections.Generic;+using UnityEngine;+using UnityEngine.UIElements;++namespace Statecraft.Game.UI+{+ /// <summary>A small vector icon drawn with Painter2D (no image asset), in the promo's style (promo/final/03): a gold coin+ /// for the Treasury, figures for Immigration and Public Support, a blue shield for Security, a globe for International+ /// Standing, a banknote for Foreign Currency, gold line icons for the screen buttons, and a terrain sign per biome. Each+ /// glyph is drawn in a 24 x 24 design box, scaled to the element's content box and centred in it. In UXML:+ /// <c><Statecraft.Game.UI.UiIcon glyph="coin" /></c>. An unknown glyph draws nothing.</summary>+ [UxmlElement]+ public partial class UiIcon : VisualElement+ {+ public const string ClassName = "ui-icon";++ /// <summary>Every glyph this element can draw (UiIconTests checks each one draws).</summary>+ public static IReadOnlyCollection<string> Glyphs => Painters.Keys;++ string glyph = "";++ /// <summary>The glyph's name (see <see cref="Glyphs"/>); the UXML attribute "glyph".</summary>+ [UxmlAttribute]+ public string Glyph { get => glyph; set { glyph = value ?? ""; MarkDirtyRepaint(); } }++ public UiIcon() : this("") { }++ public UiIcon(string glyph)+ {+ this.glyph = glyph;+ AddToClassList(ClassName);+ pickingMode = PickingMode.Ignore;+ generateVisualContent += Draw;+ }++ // The palette: the promo's gold, beige figures, blue shield and globe, and a sage banknote.+ static readonly Color Gold = new Color32(214, 176, 98, 255), GoldDark = new Color32(132, 96, 44, 255),+ GoldLight = new Color32(244, 214, 146, 255), Beige = new Color32(226, 206, 166, 255), BeigeDark = new Color32(176, 154, 116, 255),+ Blue = new Color32(92, 138, 200, 255), BlueLight = new Color32(206, 224, 246, 255), Sage = new Color32(126, 168, 120, 255),+ SageLight = new Color32(214, 236, 204, 255), Navy = new Color32(14, 22, 38, 200);++ delegate void Painter(Painter2D p, Func<float, float, Vector2> at, float s);++ static readonly Dictionary<string, Painter> Painters = new Dictionary<string, Painter>+ {+ ["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,+ ["biome-sea"] = Waves, ["biome-lake"] = Waves, ["biome-coastal_plain"] = Plain, ["biome-hills"] = Hills,+ ["biome-mountains"] = Mountains, ["biome-valley"] = Valley, ["biome-desert"] = Dunes,+ };++ void Draw(MeshGenerationContext mgc) => Paint(mgc, glyph, contentRect);++ /// <summary>Draws <paramref name="glyph"/> centred in <paramref name="box"/> (the element's local coordinates). For a+ /// text element (a Button) the sign is painted into the element itself rather than added as a child: a child would+ /// make it a non-leaf node, and Yoga measures only leaf nodes' text, so the button would stop growing to fit its text.</summary>+ public static void Paint(MeshGenerationContext mgc, string glyph, Rect box)+ {+ if (!Painters.TryGetValue(glyph, out var paint)) return;+ if (!(box.width > 0) || !(box.height > 0)) return;+ var s = Mathf.Min(box.width, box.height) / 24f;+ var origin = new Vector2(box.x + (box.width - 24f * s) / 2f, box.y + (box.height - 24f * s) / 2f);+ var p = mgc.painter2D;+ p.lineJoin = LineJoin.Round; p.lineCap = LineCap.Round;+ paint(p, (x, y) => origin + new Vector2(x, y) * s, s);+ }++ /// <summary>A round navy disc with a gold rim and <paramref name="glyph"/> inside it, centred on <paramref name="centre"/>+ /// (the promo's round option and button sign).</summary>+ public static void PaintDisc(MeshGenerationContext mgc, string glyph, Vector2 centre, float radius)+ {+ var p = mgc.painter2D;+ p.fillColor = new Color32(14, 22, 38, 255); p.strokeColor = new Color32(196, 160, 92, 150); p.lineWidth = 1f;+ Circle(p, centre, radius); p.Fill(); p.Stroke();+ var inner = radius * 0.62f;+ Paint(mgc, glyph, new Rect(centre.x - inner, centre.y - inner, 2 * inner, 2 * inner));+ }++ // --- helpers (design-box coordinates) ---+ static void Circle(Painter2D p, Vector2 c, float r) { p.BeginPath(); p.Arc(c, r, Angle.Degrees(0), Angle.Degrees(360)); p.ClosePath(); }++ static void Ellipse(Painter2D p, Vector2 c, float rx, float ry)+ {+ const float k = 0.5523f; // cubic Bezier quarter-circle constant+ p.BeginPath();+ p.MoveTo(c + new Vector2(rx, 0));+ p.BezierCurveTo(c + new Vector2(rx, ry * k), c + new Vector2(rx * k, ry), c + new Vector2(0, ry));+ p.BezierCurveTo(c + new Vector2(-rx * k, ry), c + new Vector2(-rx, ry * k), c + new Vector2(-rx, 0));+ p.BezierCurveTo(c + new Vector2(-rx, -ry * k), c + new Vector2(-rx * k, -ry), c + new Vector2(0, -ry));+ p.BezierCurveTo(c + new Vector2(rx * k, -ry), c + new Vector2(rx, -ry * k), c + new Vector2(rx, 0));+ p.ClosePath();+ }++ static void Rect(Painter2D p, Func<float, float, Vector2> at, float x, float y, float w, float h)+ {+ p.BeginPath(); p.MoveTo(at(x, y)); p.LineTo(at(x + w, y)); p.LineTo(at(x + w, y + h)); p.LineTo(at(x, y + h)); p.ClosePath();+ }++ /// <summary>A head and rounded shoulders, centred on cx, scaled by k from a 12-unit-tall figure standing on y=21.</summary>+ static void Figure(Painter2D p, Func<float, float, Vector2> at, float s, float cx, float k, Color fill, Color edge)+ {+ p.fillColor = fill; p.strokeColor = edge; p.lineWidth = 0.9f * s;+ Circle(p, at(cx, 21 - 13.2f * k), 3.1f * k * s); p.Fill(); p.Stroke();+ p.BeginPath();+ p.MoveTo(at(cx - 5.4f * k, 21)); p.LineTo(at(cx - 5.4f * k, 21 - 4.6f * k));+ p.Arc(at(cx, 21 - 4.6f * k), 5.4f * k * s, Angle.Degrees(180), Angle.Degrees(360));+ p.LineTo(at(cx + 5.4f * k, 21)); p.ClosePath(); p.Fill(); p.Stroke();+ }++ // --- the indicator icons ---+ static void Coin(Painter2D p, Func<float, float, Vector2> at, float s)+ {+ p.fillColor = GoldDark; p.strokeColor = new Color32(96, 68, 30, 255); p.lineWidth = 0.9f * s;+ Circle(p, at(14.5f, 14.5f), 7.4f * s); p.Fill(); p.Stroke();+ p.fillColor = Gold;+ Circle(p, at(10.5f, 10.5f), 8.4f * s); p.Fill(); p.Stroke();+ p.strokeColor = GoldLight; p.lineWidth = 0.9f * s;+ Circle(p, at(10.5f, 10.5f), 5.8f * s); p.Stroke();+ }++ static void People(Painter2D p, Func<float, float, Vector2> at, float s)+ {+ Figure(p, at, s, 15.2f, 0.92f, BeigeDark, Navy);+ Figure(p, at, s, 8.8f, 1f, Beige, Navy);+ }++ static void Crowd(Painter2D p, Func<float, float, Vector2> at, float s)+ {+ Figure(p, at, s, 5.6f, 0.78f, BeigeDark, Navy);+ Figure(p, at, s, 18.4f, 0.78f, BeigeDark, Navy);+ Figure(p, at, s, 12f, 0.95f, Beige, Navy);+ }++ static void ShieldPath(Painter2D p, Func<float, float, Vector2> at)+ {+ p.BeginPath();+ p.MoveTo(at(12, 2.2f)); p.LineTo(at(20.2f, 5.2f)); p.LineTo(at(20.2f, 11));+ p.BezierCurveTo(at(20.2f, 16.6f), at(16.6f, 20.2f), at(12, 22.2f));+ p.BezierCurveTo(at(7.4f, 20.2f), at(3.8f, 16.6f), at(3.8f, 11));+ p.LineTo(at(3.8f, 5.2f)); p.ClosePath();+ }++ static void Shield(Painter2D p, Func<float, float, Vector2> at, float s)+ {+ ShieldPath(p, at); p.fillColor = Blue; p.Fill();+ p.strokeColor = BlueLight; p.lineWidth = 1.3f * s;+ p.BeginPath(); p.MoveTo(at(12, 3.6f)); p.LineTo(at(12, 20.6f)); p.Stroke();+ p.BeginPath(); p.MoveTo(at(4.6f, 10.6f)); p.LineTo(at(19.4f, 10.6f)); p.Stroke();+ ShieldPath(p, at); p.lineWidth = 1.1f * s; p.Stroke();+ }++ static void Globe(Painter2D p, Func<float, float, Vector2> at, float s)+ {+ p.fillColor = new Color(Blue.r, Blue.g, Blue.b, 0.22f);+ Circle(p, at(12, 12), 9.2f * s); p.Fill();+ p.strokeColor = Blue; p.lineWidth = 1.5f * s;+ Circle(p, at(12, 12), 9.2f * s); p.Stroke();+ p.lineWidth = 1.1f * s;+ Ellipse(p, at(12, 12), 4.2f * s, 9.2f * s); p.Stroke();+ p.BeginPath(); p.MoveTo(at(12, 2.8f)); p.LineTo(at(12, 21.2f)); p.Stroke();+ p.BeginPath(); p.MoveTo(at(2.8f, 12)); p.LineTo(at(21.2f, 12)); p.Stroke();+ p.BeginPath(); p.MoveTo(at(4.4f, 7.4f)); p.LineTo(at(19.6f, 7.4f)); p.Stroke();+ p.BeginPath(); p.MoveTo(at(4.4f, 16.6f)); p.LineTo(at(19.6f, 16.6f)); p.Stroke();+ }++ static void Banknote(Painter2D p, Func<float, float, Vector2> at, float s)+ {+ p.fillColor = new Color32(84, 120, 82, 255); p.strokeColor = SageLight; p.lineWidth = 0.9f * s;+ Rect(p, at, 4.5f, 4.2f, 17, 11); p.Fill(); p.Stroke();+ p.fillColor = Sage;+ Rect(p, at, 2.5f, 7.8f, 17, 11); p.Fill(); p.Stroke();+ p.strokeColor = SageLight; p.lineWidth = 1f * s;+ Circle(p, at(11, 13.3f), 3f * s); p.Stroke();+ p.BeginPath(); p.MoveTo(at(4.8f, 10.2f)); p.LineTo(at(6.4f, 10.2f)); p.Stroke();+ p.BeginPath(); p.MoveTo(at(15.6f, 16.4f)); p.LineTo(at(17.2f, 16.4f)); p.Stroke();+ }++ // --- the screen buttons (gold line art, as the promo's round buttons) ---+ static void Columns(Painter2D p, Func<float, float, Vector2> at, float s)+ {+ p.fillColor = Gold;+ p.BeginPath(); p.MoveTo(at(2.5f, 8)); p.LineTo(at(12, 2.6f)); p.LineTo(at(21.5f, 8)); p.ClosePath(); p.Fill();+ Rect(p, at, 3, 8.8f, 18, 1.6f); p.Fill();+ foreach (var x in new[] { 4.6f, 9.1f, 13.3f, 17.8f }) { Rect(p, at, x, 11.2f, 1.6f, 7); p.Fill(); }+ Rect(p, at, 2.6f, 18.8f, 18.8f, 1.5f); p.Fill();+ Rect(p, at, 1.6f, 20.9f, 20.8f, 1.5f); p.Fill();+ }++ static void Scales(Painter2D p, Func<float, float, Vector2> at, float s)+ {+ p.strokeColor = Gold; p.fillColor = Gold; p.lineWidth = 1.4f * s;+ p.BeginPath(); p.MoveTo(at(12, 4.6f)); p.LineTo(at(12, 19.6f)); p.Stroke();+ p.BeginPath(); p.MoveTo(at(3.6f, 7)); p.LineTo(at(20.4f, 7)); p.Stroke();+ Circle(p, at(12, 4.2f), 1.5f * s); p.Fill();+ Rect(p, at, 7.2f, 19.6f, 9.6f, 1.8f); p.Fill();+ foreach (var cx in new[] { 4.6f, 19.4f })+ {+ p.lineWidth = 0.9f * s;+ p.BeginPath(); p.MoveTo(at(cx, 7)); p.LineTo(at(cx - 3.1f, 13.4f)); p.Stroke();+ p.BeginPath(); p.MoveTo(at(cx, 7)); p.LineTo(at(cx + 3.1f, 13.4f)); p.Stroke();+ p.BeginPath(); p.MoveTo(at(cx + 3.6f, 13.4f));+ p.Arc(at(cx, 13.4f), 3.6f * s, Angle.Degrees(0), Angle.Degrees(180)); p.ClosePath(); p.Fill();+ }+ }++ static void Helmet(Painter2D p, Func<float, float, Vector2> at, float s)+ {+ p.fillColor = Gold;+ p.BeginPath(); p.MoveTo(at(4.2f, 15.4f)); p.Arc(at(12, 15.4f), 7.8f * s, Angle.Degrees(180), Angle.Degrees(360)); p.ClosePath(); p.Fill();+ p.BeginPath(); p.MoveTo(at(1.8f, 15.6f)); p.LineTo(at(22.2f, 15.6f)); p.LineTo(at(20.6f, 18.4f)); p.LineTo(at(3.4f, 18.4f)); p.ClosePath(); p.Fill();+ p.strokeColor = GoldDark; p.lineWidth = 1f * s;+ p.BeginPath(); p.MoveTo(at(7.2f, 13.6f)); p.Arc(at(12, 13.6f), 4.8f * s, Angle.Degrees(180), Angle.Degrees(270)); p.Stroke();+ }++ static void Question(Painter2D p, Func<float, float, Vector2> at, float s)+ {+ p.strokeColor = Gold; p.lineWidth = 2.3f * s;+ p.BeginPath(); p.MoveTo(at(7.4f, 8.6f));+ p.Arc(at(12, 8.6f), 4.6f * s, Angle.Degrees(180), Angle.Degrees(405));+ p.LineTo(at(12, 14.6f)); p.LineTo(at(12, 15.8f)); p.Stroke();+ p.fillColor = Gold; Circle(p, at(12, 20), 1.6f * s); p.Fill();+ }++ static void Restart(Painter2D p, Func<float, float, Vector2> at, float s)+ {+ p.strokeColor = Gold; p.lineWidth = 2f * s;+ p.BeginPath(); p.MoveTo(at(16.2f, 6.2f));+ p.Arc(at(12, 12.6f), 7.6f * s, Angle.Degrees(303), Angle.Degrees(573)); p.Stroke();+ p.fillColor = Gold;+ p.BeginPath(); p.MoveTo(at(13.6f, 2.6f)); p.LineTo(at(20.4f, 5.4f)); p.LineTo(at(15.0f, 10.4f)); p.ClosePath(); p.Fill();+ }++ static void Chevron(Painter2D p, Func<float, float, Vector2> at, float s)+ {+ p.strokeColor = Gold; p.lineWidth = 2.2f * s;+ p.BeginPath(); p.MoveTo(at(9.6f, 6.4f)); p.LineTo(at(15.2f, 12)); p.LineTo(at(9.6f, 17.6f)); p.Stroke();+ }++ static void Hourglass(Painter2D p, Func<float, float, Vector2> at, float s)+ {+ p.strokeColor = Gold; p.lineWidth = 1.5f * s;+ p.BeginPath(); p.MoveTo(at(6, 3)); p.LineTo(at(18, 3)); p.Stroke();+ p.BeginPath(); p.MoveTo(at(6, 21)); p.LineTo(at(18, 21)); p.Stroke();+ p.BeginPath(); p.MoveTo(at(7.4f, 3)); p.BezierCurveTo(at(7.4f, 9), at(11, 10.4f), at(11, 12)); p.BezierCurveTo(at(11, 13.6f), at(7.4f, 15), at(7.4f, 21)); p.Stroke();+ p.BeginPath(); p.MoveTo(at(16.6f, 3)); p.BezierCurveTo(at(16.6f, 9), at(13, 10.4f), at(13, 12)); p.BezierCurveTo(at(13, 13.6f), at(16.6f, 15), at(16.6f, 21)); p.Stroke();+ p.fillColor = Gold;+ p.BeginPath(); p.MoveTo(at(8.6f, 20)); p.LineTo(at(12, 16.4f)); p.LineTo(at(15.4f, 20)); 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, 150);++ static void Waves(Painter2D p, Func<float, float, Vector2> at, float s)+ {+ p.strokeColor = InkLight; p.lineWidth = 1.6f * s;+ foreach (var y in new[] { 8f, 13f, 18f })+ {+ p.BeginPath(); p.MoveTo(at(3, y));+ p.BezierCurveTo(at(5.5f, y - 2.6f), at(7, y - 2.6f), at(9, y)); p.BezierCurveTo(at(11, y + 2.6f), at(13, y + 2.6f), at(15, y));+ p.BezierCurveTo(at(17, y - 2.6f), at(19, y - 2.6f), at(21, y)); p.Stroke();+ }+ }++ static void Plain(Painter2D p, Func<float, float, Vector2> at, float s)+ {+ p.strokeColor = Ink; p.lineWidth = 1.4f * s;+ p.BeginPath(); p.MoveTo(at(2.5f, 17)); p.LineTo(at(21.5f, 17)); p.Stroke();+ foreach (var x in new[] { 6f, 12f, 18f })+ {+ p.BeginPath(); p.MoveTo(at(x, 17)); p.LineTo(at(x, 10.5f)); p.Stroke();+ p.BeginPath(); p.MoveTo(at(x, 13.4f)); p.LineTo(at(x - 2.2f, 11.2f)); p.Stroke();+ p.BeginPath(); p.MoveTo(at(x, 12.2f)); p.LineTo(at(x + 2.2f, 10f)); p.Stroke();+ }+ }++ static void Hills(Painter2D p, Func<float, float, Vector2> at, float s)+ {+ p.fillColor = Ink;+ p.BeginPath(); p.MoveTo(at(1.5f, 19)); p.BezierCurveTo(at(4, 9.5f), at(10, 9.5f), at(12.5f, 15)); p.BezierCurveTo(at(14.5f, 11), at(20, 11), at(22.5f, 19)); p.ClosePath(); p.Fill();+ }++ static void Mountains(Painter2D p, Func<float, float, Vector2> at, float s)+ {+ p.fillColor = Ink;+ p.BeginPath(); p.MoveTo(at(1.5f, 20)); p.LineTo(at(9, 5)); p.LineTo(at(13, 12)); p.LineTo(at(16, 8.4f)); p.LineTo(at(22.5f, 20)); p.ClosePath(); p.Fill();+ p.fillColor = InkLight;+ p.BeginPath(); p.MoveTo(at(9, 5)); p.LineTo(at(11.2f, 9.4f)); p.LineTo(at(9.6f, 8.6f)); p.LineTo(at(8.2f, 9.8f)); p.LineTo(at(7.2f, 8.6f)); p.ClosePath(); p.Fill();+ }++ static void Valley(Painter2D p, Func<float, float, Vector2> at, float s)+ {+ p.fillColor = Ink;+ p.BeginPath(); p.MoveTo(at(1.5f, 6)); p.BezierCurveTo(at(6, 7), at(9, 15), at(12, 17)); p.BezierCurveTo(at(15, 15), at(18, 7), at(22.5f, 6)); p.LineTo(at(22.5f, 20)); p.LineTo(at(1.5f, 20)); p.ClosePath(); p.Fill();+ p.strokeColor = InkLight; p.lineWidth = 1.3f * s;+ p.BeginPath(); p.MoveTo(at(12, 17.4f)); p.BezierCurveTo(at(10.5f, 18.6f), at(13.5f, 19.2f), at(12, 20)); p.Stroke();+ }++ static void Dunes(Painter2D p, Func<float, float, Vector2> at, float s)+ {+ p.fillColor = Ink;+ p.BeginPath(); p.MoveTo(at(1.5f, 20)); p.BezierCurveTo(at(5, 12), at(9, 11), at(14, 16)); p.BezierCurveTo(at(17, 13), at(20, 13), at(22.5f, 15)); p.LineTo(at(22.5f, 20)); p.ClosePath(); p.Fill();+ p.fillColor = InkLight;+ Circle(p, at(17.5f, 6.5f), 2.4f * s); p.Fill();+ }+ }+}diff --git a/unity/Assets/Scripts/UI/UiIcon.cs.meta b/unity/Assets/Scripts/UI/UiIcon.cs.metanew file mode 100644index 000000000..23fca5718--- /dev/null+++ b/unity/Assets/Scripts/UI/UiIcon.cs.meta@@ -0,0 +1,2 @@+fileFormatVersion: 2+guid: ff2f081c2a199497a8aee92c94222482\ No newline at end of filediff --git a/unity/Assets/Tests/EditMode/PromoHudTests.cs b/unity/Assets/Tests/EditMode/PromoHudTests.csnew file mode 100644index 000000000..a1ac1d428--- /dev/null+++ b/unity/Assets/Tests/EditMode/PromoHudTests.cs@@ -0,0 +1,165 @@+#nullable enable+using System.IO;+using System.Linq;+using System.Collections;+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>The promo HUD pass (promo/final/03): the top bar's indicator icons, the round screen buttons and their lit+/// state, the event card's option signs, the info panel's terrain sign (real hex facts, no tile yields) and the panel+/// trim. Behaviour is unchanged; these check the new pieces are wired to the real elements and data.</summary>+public class PromoHudTests+{+ static readonly Content C = ContentLoader.Load(Paths.Content);+ static UiText Text => UiText.Parse(AssetDatabase.LoadAssetAtPath<TextAsset>(UiPaths.Strings).text);++ [Test]+ public void EveryIndicatorHasItsIcon()+ {+ using var ui = new UiTestKit();+ foreach (var (meter, glyph) in new[] { ("meter-treasury", "coin"), ("meter-immigration", "people"), ("meter-security", "shield"),+ ("meter-support", "crowd"), ("meter-standing", "globe"), ("meter-fx", "banknote") })+ {+ var icon = ui.Q<VisualElement>(meter).Q<UiIcon>();+ Assert.IsNotNull(icon, meter);+ Assert.AreEqual(glyph, icon.Glyph, meter);+ CollectionAssert.Contains(UiIcon.Glyphs, glyph, meter + ": a glyph the icon can draw");+ }+ }++ [Test]+ public void EveryScreenButtonIsARoundIconWithItsName()+ {+ using var ui = new UiTestKit();+ foreach (var (button, name, glyph) in new[] { ("nav-cabinet", "Cabinet", "columns"), ("nav-budget", "Budget", "scales"),+ ("nav-defence", "Defence", "helmet"), ("nav-why", "Why?", "question"), ("new-game", "New Game", "restart") })+ {+ var b = ui.Q<Button>(button);+ Assert.AreEqual(name, b.text, button + ": the name stays the button's text (legible, and what the event log records)");+ var disc = b.Q<UiIcon>(className: "nav-disc");+ Assert.IsNotNull(disc, button);+ Assert.AreEqual(glyph, disc.Glyph, button);+ Assert.AreEqual(PickingMode.Ignore, disc.pickingMode, button + ": a click on the disc reaches the button");+ }+ }++ [Test]+ public void TheOpenScreensButtonIsLit()+ {+ using var ui = new UiTestKit();+ var nav = new ScreenNav(ui.Root);+ try+ {+ Assert.IsFalse(ScreenNav.Screens.Any(s => ui.Q<Button>("nav-" + s).ClassListContains(ScreenNav.OpenClass)), "none lit at start");+ nav.Toggle("budget");+ foreach (var s in ScreenNav.Screens) Assert.AreEqual(s == "budget", ui.Q<Button>("nav-" + s).ClassListContains(ScreenNav.OpenClass), s);+ nav.Toggle("budget");+ Assert.IsFalse(ui.Q<Button>("nav-budget").ClassListContains(ScreenNav.OpenClass), "closing unlights it");+ }+ finally { nav.Dispose(); }+ }++ [Test]+ public void EachEventOptionCarriesItsSignAndStaysPressable()+ {+ using var ui = new UiTestKit();+ var g = GameSession.New(C, GoldenRun.Seed, Mode.Historical);+ while (!g.State.PendingEvents.Contains("armistice_egypt")) g.Step(new Command[0]);+ var bridge = new SimBridge(g, Text);+ var card = new EventCardPresenter(ui.Root, bridge, Text, null);+ var options = ui.Q<VisualElement>("event-options").Query<Button>().ToList();+ Assert.Greater(options.Count, 1);+ foreach (var b in options)+ {+ Assert.IsTrue(b.ClassListContains(EventCardPresenter.OptionClass), b.name);+ Assert.AreEqual(0, b.childCount, b.name + ": the sign is painted, so the button stays a leaf whose wrapped text is measured");+ }+ UiTestKit.Press(ui.Q<Button>("option-sign"));+ Assert.AreNotEqual("armistice_egypt", card.Shown?.Id, "the option still answers the event");+ card.Dispose();+ }++ [Test]+ public void TheInfoPanelShowsTheHexsTerrainSignAndNoYields()+ {+ using var ui = new UiTestKit();+ var towns = SettlementPlacer.Parse(File.ReadAllText(Path.Combine(Paths.Content, "map", SettlementPlacer.DefaultFileName)));+ var bridge = new SimBridge(GameSession.New(C, GoldenRun.Seed, Mode.Historical), Text);+ var info = new InfoPanelPresenter(ui.Root, bridge, Text, towns.ToDictionary(t => t.Id, t => t.Name));+ var thumb = ui.Q<UiIcon>("info-thumb");+ Assert.AreEqual(DisplayStyle.None, thumb.style.display.value, "no sign before a hex is chosen");+ var tlv = C.SettlementHexes.Single(s => s.Id == "tel_aviv");+ info.Show(tlv.Q, tlv.R);+ var biome = C.HexAt(tlv.Q, tlv.R)!.Biome;+ Assert.AreEqual(DisplayStyle.Flex, thumb.style.display.value);+ Assert.AreEqual("biome-" + biome, thumb.Glyph);+ CollectionAssert.Contains(UiIcon.Glyphs, thumb.Glyph);+ Assert.AreEqual(MapBuilder.BiomeColours[biome], thumb.style.backgroundColor.value, "the biome's own map colour");+ var words = ui.Q<VisualElement>("info-panel").Query<Label>().ToList().Select(l => l.text).ToList();+ foreach (var yield in new[] { "Food", "Production", "Culture" })+ Assert.IsFalse(words.Any(w => w.Contains(yield)), $"no {yield} yield (owner ruling)");+ info.Dispose();+ }++ [Test]+ public void EveryBiomeHasATerrainSign()+ {+ foreach (var biome in MapBuilder.BiomeColours.Keys)+ CollectionAssert.Contains(UiIcon.Glyphs, "biome-" + biome, biome);+ }++ [Test]+ public void ThePanelsCarryTheTrimAndItTakesNoClicks()+ {+ using var ui = new UiTestKit();+ foreach (var name in new[] { "event-card", "minimap", "info-panel", "screen-cabinet", "screen-budget", "screen-defence", "screen-why" })+ {+ var frame = ui.Q<VisualElement>(name).Children().OfType<UiFrame>().SingleOrDefault();+ Assert.IsNotNull(frame, name);+ Assert.AreEqual(PickingMode.Ignore, frame!.pickingMode, name);+ }+ }++ /// <summary>The icons need a wide bar: a 5:4 window (1280x1024, about 1585 logical px) gets the compact bar without them,+ /// 16:9 keeps them; either way every meter's labels stay inside the meter.</summary>+ [UnityTest]+ public IEnumerator ANarrowWindowDropsTheMeterIcons()+ {+ foreach (var (w, h, compact) in new[] { (1280, 1024, true), (1920, 1080, false), (1280, 720, false) })+ {+ var rt = new RenderTexture(w, h, 0);+ var ps = Object.Instantiate(AssetDatabase.LoadAssetAtPath<PanelSettings>(UiPaths.Panel));+ ps.targetTexture = rt;+ var go = new GameObject("CompactTest");+ 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;+ HudPresenter? hud = null;+ try+ {+ // As in the game: the bar is laid out (the loading screen) before the HUD is made, and the window never resizes.+ for (int i = 0; i < 20 && !(root.Q("top-bar").worldBound.width > 0); i++) yield return null;+ hud = new HudPresenter(root, new SimBridge(GameSession.New(C, GoldenRun.Seed, Mode.Historical), Text), Text);+ yield return null; yield return null;+ var bar = root.Q("top-bar");+ Assert.AreEqual(compact, bar.ClassListContains(HudPresenter.CompactClass), $"{w}x{h}: bar {bar.worldBound.width:0} px");+ foreach (var icon in root.Q("meters").Query<UiIcon>().ToList())+ Assert.AreEqual(compact ? DisplayStyle.None : DisplayStyle.Flex, icon.resolvedStyle.display, $"{w}x{h}: {icon.Glyph}");+ foreach (var m in root.Q("meters").Children())+ foreach (var l in m.Query<Label>().ToList())+ Assert.LessOrEqual(l.worldBound.xMax, m.worldBound.xMax + 0.5f, $"{w}x{h}: '{l.text}' leaves {m.name}");+ }+ finally { hud?.Dispose(); Object.DestroyImmediate(go); Object.DestroyImmediate(ps); rt.Release(); Object.DestroyImmediate(rt); }+ }+ }+}diff --git a/unity/Assets/Tests/EditMode/PromoHudTests.cs.meta b/unity/Assets/Tests/EditMode/PromoHudTests.cs.metanew file mode 100644index 000000000..0514d18b3--- /dev/null+++ b/unity/Assets/Tests/EditMode/PromoHudTests.cs.meta@@ -0,0 +1,2 @@+fileFormatVersion: 2+guid: f1acb8a5c864a455d9853d67bcfd8a9f\ No newline at end of filediff --git a/unity/Assets/Tests/EditMode/UiFoundationTests.cs b/unity/Assets/Tests/EditMode/UiFoundationTests.csindex 44b838775..95b75ba49 100644--- a/unity/Assets/Tests/EditMode/UiFoundationTests.cs+++ b/unity/Assets/Tests/EditMode/UiFoundationTests.cs@@ -86,7 +86,10 @@ public class UiFoundationTestsvar navy = new Color(9 / 255f, 14 / 255f, 26 / 255f, 1f);var goldDim = new Color(196 / 255f, 160 / 255f, 92 / 255f, 0.45f);var gold = new Color(196 / 255f, 160 / 255f, 92 / 255f, 1f);- var nav = ui.Q<Button>("nav-cabinet");+ // A screen button is a round, gold-rimmed navy disc with the screen's name under it (promo HUD pass): the disc+ // carries the theme's navy and dim gold.+ var nav = ui.Q<Button>("nav-cabinet").Q<UiIcon>(className: "nav-disc");+ Assert.IsNotNull(nav, "the screen button has its disc");for (int i = 0; i < 10 && nav.resolvedStyle.backgroundColor.a < 0.5f; i++) yield return null;void Near(Color e, Color a, string what) => Assert.That(Mathf.Abs(e.r - a.r) + Mathf.Abs(e.g - a.g) + Mathf.Abs(e.b - a.b) + Mathf.Abs(e.a - a.a), Is.LessThan(0.02f), $"{what}: expected {e} got {a}");Near(navy, nav.resolvedStyle.backgroundColor, "nav background");diff --git a/unity/Assets/UI/Game.uxml b/unity/Assets/UI/Game.uxmlindex 1e565e4ae..74ddaaf1e 100644--- a/unity/Assets/UI/Game.uxml+++ b/unity/Assets/UI/Game.uxml@@ -6,49 +6,69 @@<!-- Settlement names, positioned by MapLabelsPresenter under every panel; clicks pass through to the map. --><ui:VisualElement name="map-labels" class="map-labels" picking-mode="Ignore" /><ui:VisualElement name="top-bar" class="panel top-bar">+ <Statecraft.Game.UI.UiFrame corners="false" rule="false" /><ui:VisualElement class="date-box"><ui:Label name="year" class="year" /><ui:VisualElement class="date-row"><ui:Label name="turn" class="muted" /><ui:Label name="date" class="muted" /></ui:VisualElement>+ <Statecraft.Game.UI.UiFrame shadow="false" /></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;HudTests.TopBarCaptionsAreTheContentNamesInTitleCase). Immigration and Public Support are UI quantities. --><ui:VisualElement name="meters" class="meters"><ui:VisualElement name="meter-treasury" class="meter">- <ui:Label text="Treasury" class="meter-name" />- <ui:VisualElement class="meter-row"><ui:Label name="treasury-value" class="meter-value" /><ui:Label name="treasury-delta" class="meter-delta" /></ui:VisualElement>+ <Statecraft.Game.UI.UiIcon glyph="coin" class="meter-icon" />+ <ui:VisualElement class="meter-body">+ <ui:Label text="Treasury" class="meter-name" />+ <ui:VisualElement class="meter-row"><ui:Label name="treasury-value" class="meter-value" /><ui:Label name="treasury-delta" class="meter-delta" /></ui:VisualElement>+ </ui:VisualElement></ui:VisualElement><ui:VisualElement name="meter-immigration" class="meter">- <ui:Label text="Immigration" class="meter-name" />- <ui:VisualElement class="meter-row"><ui:Label name="immigration-value" class="meter-value" /><ui:Label name="immigration-delta" class="meter-delta" /></ui:VisualElement>+ <Statecraft.Game.UI.UiIcon glyph="people" class="meter-icon" />+ <ui:VisualElement class="meter-body">+ <ui:Label text="Immigration" class="meter-name" />+ <ui:VisualElement class="meter-row"><ui:Label name="immigration-value" class="meter-value" /><ui:Label name="immigration-delta" class="meter-delta" /></ui:VisualElement>+ </ui:VisualElement></ui:VisualElement><ui:VisualElement name="meter-security" class="meter">- <ui:Label text="Security" class="meter-name" />- <ui:VisualElement class="meter-row"><ui:Label name="security-value" class="meter-value" /><ui:Label name="security-delta" class="meter-delta" /></ui:VisualElement>- <ui:Label name="security-level" class="meter-name" />+ <Statecraft.Game.UI.UiIcon glyph="shield" class="meter-icon" />+ <ui:VisualElement class="meter-body">+ <ui:Label text="Security" class="meter-name" />+ <ui:VisualElement class="meter-row"><ui:Label name="security-value" class="meter-value" /><ui:Label name="security-delta" class="meter-delta" /></ui:VisualElement>+ <ui:Label name="security-level" class="meter-name" />+ </ui:VisualElement></ui:VisualElement><ui:VisualElement name="meter-support" class="meter">- <ui:Label text="Public Support" class="meter-name" />- <ui:VisualElement class="meter-row"><ui:Label name="support-value" class="meter-value" /><ui:Label name="support-delta" class="meter-delta" /></ui:VisualElement>+ <Statecraft.Game.UI.UiIcon glyph="crowd" class="meter-icon" />+ <ui:VisualElement class="meter-body">+ <ui:Label text="Public Support" class="meter-name" />+ <ui:VisualElement class="meter-row"><ui:Label name="support-value" class="meter-value" /><ui:Label name="support-delta" class="meter-delta" /></ui:VisualElement>+ </ui:VisualElement></ui:VisualElement><ui:VisualElement name="meter-standing" class="meter">- <ui:Label text="International Standing" class="meter-name" />- <ui:VisualElement class="meter-row"><ui:Label name="standing-value" class="meter-value" /><ui:Label name="standing-delta" class="meter-delta" /></ui:VisualElement>+ <Statecraft.Game.UI.UiIcon glyph="globe" class="meter-icon" />+ <ui:VisualElement class="meter-body">+ <ui:Label text="International Standing" class="meter-name" />+ <ui:VisualElement class="meter-row"><ui:Label name="standing-value" class="meter-value" /><ui:Label name="standing-delta" class="meter-delta" /></ui:VisualElement>+ </ui:VisualElement></ui:VisualElement><ui:VisualElement name="meter-fx" class="meter">- <ui:Label text="Foreign Currency" class="meter-name" />- <ui:VisualElement class="meter-row"><ui:Label name="fx-value" class="meter-value" /><ui:Label name="fx-delta" class="meter-delta" /></ui:VisualElement>+ <Statecraft.Game.UI.UiIcon glyph="banknote" class="meter-icon" />+ <ui:VisualElement class="meter-body">+ <ui:Label text="Foreign Currency" class="meter-name" />+ <ui:VisualElement class="meter-row"><ui:Label name="fx-value" class="meter-value" /><ui:Label name="fx-delta" class="meter-delta" /></ui:VisualElement>+ </ui:VisualElement></ui:VisualElement></ui:VisualElement><ui:VisualElement name="nav" class="nav">- <ui:Button name="nav-cabinet" text="Cabinet" />- <ui:Button name="nav-budget" text="Budget" />- <ui:Button name="nav-defence" text="Defence" />- <ui:Button name="nav-why" text="Why?" />- <ui:Button name="new-game" text="New Game" />+ <ui:Button name="nav-cabinet" text="Cabinet" class="nav-button"><Statecraft.Game.UI.UiIcon glyph="columns" class="nav-disc" /></ui:Button>+ <ui:Button name="nav-budget" text="Budget" class="nav-button"><Statecraft.Game.UI.UiIcon glyph="scales" class="nav-disc" /></ui:Button>+ <ui:Button name="nav-defence" text="Defence" class="nav-button"><Statecraft.Game.UI.UiIcon glyph="helmet" class="nav-disc" /></ui:Button>+ <ui:Button name="nav-why" text="Why?" class="nav-button"><Statecraft.Game.UI.UiIcon glyph="question" class="nav-disc" /></ui:Button>+ <ui:Button name="new-game" text="New Game" class="nav-button"><Statecraft.Game.UI.UiIcon glyph="restart" class="nav-disc" /></ui:Button></ui:VisualElement><ui:VisualElement class="turn-box"><ui:Label name="attention" class="muted" />@@ -68,27 +88,36 @@<ui:Label name="event-office" class="muted event-office" /></ui:VisualElement></ui:VisualElement>+ <ui:VisualElement class="gold-rule" /><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 /></ui:VisualElement><ui:VisualElement class="right-gap" picking-mode="Ignore" /><ui:VisualElement name="minimap" class="panel minimap"><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 /></ui:VisualElement></ui:VisualElement><ui:VisualElement name="info-panel" class="panel info-panel">- <ui:Label name="info-title" class="title" />- <ui:Label name="info-subtitle" class="muted" />- <ui:Label name="info-settlements" />- <ui:Label name="info-placement" class="muted" />- <ui:VisualElement class="row">- <ui:Button name="build-camp" />- <ui:Button name="build-housing" />+ <!-- The selected hex's terrain sign on its map colour, beside its real facts (no tile yields: owner ruling). -->+ <Statecraft.Game.UI.UiIcon name="info-thumb" class="info-thumb" />+ <ui:VisualElement class="info-body">+ <ui:Label name="info-title" class="title" />+ <ui:Label name="info-subtitle" class="muted" />+ <ui:VisualElement class="gold-rule" />+ <ui:Label name="info-settlements" />+ <ui:Label name="info-placement" class="muted" />+ <ui:VisualElement class="row">+ <ui:Button name="build-camp" />+ <ui:Button name="build-housing" />+ </ui:VisualElement>+ <ui:Label name="info-reason" class="reason" /></ui:VisualElement>- <ui:Label name="info-reason" class="reason" />+ <Statecraft.Game.UI.UiFrame /></ui:VisualElement><ui:VisualElement name="screen-cabinet" class="panel screen"><ui:VisualElement class="screen-header"><ui:Label name="cabinet-government" class="title" /><ui:Label name="cabinet-coalition" class="muted" /></ui:VisualElement>@@ -100,6 +129,7 @@</ui:VisualElement></ui:VisualElement><ui:Label name="cabinet-status" class="muted" />+ <Statecraft.Game.UI.UiFrame /></ui:VisualElement><ui:VisualElement name="screen-budget" class="panel screen"><ui:VisualElement class="screen-header"><ui:Label text="Budget" class="title" /><ui:Label name="budget-vote" class="muted" /></ui:VisualElement>@@ -111,6 +141,7 @@<ui:Button name="budget-submit" text="Submit the budget" /><ui:Label name="budget-status" class="muted grow" /></ui:VisualElement>+ <Statecraft.Game.UI.UiFrame /></ui:VisualElement><ui:VisualElement name="screen-defence" class="panel screen"><ui:VisualElement class="screen-header"><ui:Label text="Defence" class="title" /><ui:Label name="defence-command" class="muted" /></ui:VisualElement>@@ -135,10 +166,12 @@<ui:Button name="mob-up" text="+5%" /></ui:VisualElement><ui:Label name="mob-cost" class="muted" />+ <Statecraft.Game.UI.UiFrame /></ui:VisualElement><ui:VisualElement name="screen-why" class="panel screen"><ui:VisualElement class="screen-header"><ui:Label text="Why did this happen?" class="title" /><ui:Label name="why-turn" class="muted" /></ui:VisualElement><ui:ScrollView name="why-rows" class="grow" />+ <Statecraft.Game.UI.UiFrame /></ui:VisualElement><ui:Label name="toast" class="panel toast" /></ui:VisualElement>diff --git a/unity/Assets/UI/Statecraft.uss b/unity/Assets/UI/Statecraft.ussindex 089b1c46b..110dde7b3 100644--- a/unity/Assets/UI/Statecraft.uss+++ b/unity/Assets/UI/Statecraft.uss@@ -1,9 +1,13 @@-/* Statecraft UI language (target: promo/final/03-gameplay-1936.png): dark navy panels, thin gold borders, serif type. */+/* Statecraft UI language, restyled to the promo's interface (promo/final/03-gameplay-1936.png, 05, 08): translucent navy+ panels with a thin gold border, an inset gold rule, corner brackets and a soft shadow (UiFrame), round gold-rimmed icon+ buttons (UiIcon), an icon per indicator in the top bar, and EB Garamond throughout. */:root {- --navy: rgba(14, 22, 38, 0.94);+ --navy: rgba(13, 21, 37, 0.97); /* blended in linear space: 0.97 still lets the map's light through faintly */--navy-deep: rgb(9, 14, 26);--navy-solid: rgb(14, 22, 38); /* --navy without its transparency */+ --navy-raised: rgb(20, 31, 52); /* the date badge and a hovered button */--gold: rgb(196, 160, 92);+ --gold-light: rgb(232, 204, 142);--gold-dim: rgba(196, 160, 92, 0.45);--ink: rgb(236, 228, 210);--ink-dim: rgb(170, 164, 150);@@ -22,10 +26,13 @@background-color: var(--navy);border-color: var(--gold-dim);border-width: 1px;- border-radius: 4px;+ border-radius: 3px;padding: 12px;}+/* UiFrame: the trim overlay (drawn in code) fills its panel and is never laid out with the content. */+.ui-frame { position: absolute; left: 0; top: 0; right: 0; bottom: 0; }+.title {-unity-font-definition: url("project://database/Assets/UI/Fonts/EBGaramond-SemiBold.ttf");font-size: 30px;@@ -35,12 +42,14 @@.muted { color: var(--ink-dim); }.delta-up { color: var(--up); }.delta-down { color: var(--down); }+/* A thin gold rule under a heading (the promo's divider). */+.gold-rule { height: 1px; flex-shrink: 0; background-color: var(--gold-dim); margin: 4px 0 6px 0; }.button, Button {background-color: var(--navy-deep);border-color: var(--gold-dim);border-width: 1px;- border-radius: 3px;+ border-radius: 4px;color: var(--ink);-unity-font-definition: url("project://database/Assets/UI/Fonts/EBGaramond-Regular.ttf");font-size: 19px;@@ -48,33 +57,76 @@margin: 3px 0;-unity-text-align: middle-left;}-Button:hover { border-color: var(--gold); }-Button:disabled { color: var(--ink-dim); border-color: rgba(120, 120, 120, 0.4); }+Button:hover { border-color: var(--gold); background-color: var(--navy-raised); }+/* Keyboard focus shows as a bright gold edge (navigation with Tab and the arrow keys). */+Button:focus { border-color: var(--gold-light); }+Button:disabled { color: var(--ink-dim); border-color: rgba(120, 120, 120, 0.4); background-color: var(--navy-deep); }-/* Top bar: date box, national indicators with value and change, screen buttons, attention and End turn. */+/* Top bar: the date badge, the national indicators (icon, name, value and change), the round screen buttons, attention+ and End Turn. */.top-bar {position: absolute; left: 0; right: 0; top: 0; height: 96px;flex-direction: row; align-items: center;- border-width: 0 0 1px 0; border-radius: 0; padding: 0 16px;+ border-width: 0 0 1px 0; border-radius: 0; padding: 0 14px 0 8px;+ border-color: rgba(196, 160, 92, 0.75);background-color: var(--navy-solid); /* opaque: map labels must not show through it (Task 24 review M7) */}/* Everything in the bar must fit its 96px (EB Garamond lines are about 1.55 x the font size): labels lose their defaultvertical padding and margin, the year is 32px, and turn and date share one line. */.top-bar Label { padding-top: 0; padding-bottom: 0; margin-top: 0; margin-bottom: 0; }-.date-box { width: 190px; flex-shrink: 1; min-width: 150px; border-right-width: 1px; border-color: var(--gold-dim); padding-right: 12px; }+/* The date badge: a raised, trimmed box at the left, as the promo's "1936 / Turn 1 / January 1936" plate. */+.date-box {+ width: 190px; flex-shrink: 1; min-width: 150px; height: 82px; justify-content: center;+ padding: 0 12px 0 18px; margin-right: 10px;+ background-color: var(--navy-raised); border-width: 1px; border-color: var(--gold-dim); border-radius: 2px;+}.date-row { flex-direction: row; }.date-row Label { font-size: 17px; margin-right: 8px; }-.year { -unity-font-definition: url("project://database/Assets/UI/Fonts/EBGaramond-SemiBold.ttf"); font-size: 32px; }-.meters { flex-direction: row; flex-grow: 1; }-.meter { min-width: 130px; flex-shrink: 1; padding: 0 8px; border-right-width: 1px; border-color: var(--gold-dim); }-.meter-name { font-size: 16px; color: var(--ink-dim); white-space: normal; } /* wraps in a narrow meter */+.year { -unity-font-definition: url("project://database/Assets/UI/Fonts/EBGaramond-SemiBold.ttf"); font-size: 32px; color: var(--ink); }+.meters { flex-direction: row; flex-grow: 1; align-items: center; }+.meter {+ flex-direction: row; align-items: center; min-width: 130px; flex-shrink: 1; padding: 0 10px 0 8px;+ border-right-width: 1px; border-color: rgba(196, 160, 92, 0.25);+}+/* The icon gives way first in a narrow window (down to 26px), so the caption keeps its line. */+.meter-icon { width: 38px; height: 38px; flex-shrink: 1; min-width: 26px; margin-right: 7px; }+.meter-body { flex-shrink: 1; flex-grow: 1; min-width: 0; }+.meter-name { font-size: 16px; color: var(--ink); white-space: normal; } /* wraps in a narrow meter */+#security-level { font-size: 14px; color: var(--ink-dim); }.meter-row { flex-direction: row; align-items: flex-end; }-.meter-value { font-size: 24px; }-.meter-delta { font-size: 16px; margin-left: 8px; }-.nav { flex-direction: row; flex-shrink: 0; }-.nav Button { margin: 0 4px; -unity-text-align: middle-center; }+.meter-value { font-size: 24px; color: var(--ink); }+.meter-delta { font-size: 17px; margin-left: 8px; }+/* The screen buttons: a round, gold-rimmed icon with its name under it (the name keeps them legible without tooltips). */+.nav { flex-direction: row; flex-shrink: 0; align-items: center; }+.nav-button {+ width: 68px; height: 86px; margin: 0 2px; padding: 56px 0 0 0;+ background-color: rgba(0, 0, 0, 0); border-width: 0;+ font-size: 14px; color: var(--ink-dim); -unity-text-align: upper-center; white-space: nowrap;+}+.nav-disc {+ position: absolute; top: 2px; left: 9px; width: 50px; height: 50px; padding: 11px;+ border-radius: 25px; border-width: 1.5px; border-color: var(--gold-dim); background-color: var(--navy-deep);+}+.nav-button:hover { background-color: rgba(0, 0, 0, 0); color: var(--ink); }+.nav-button:hover .nav-disc { border-color: var(--gold); background-color: var(--navy-raised); }+.nav-button:focus { color: var(--ink); }+.nav-button:focus .nav-disc { border-color: var(--gold-light); }+/* The open screen's button (ScreenNav). */+.nav-open { color: var(--gold-light); }+.nav-open .nav-disc { border-color: var(--gold-light); background-color: var(--navy-raised); }+/* A window too narrow for the icons (HudPresenter sets top-bar--compact below HudPresenter.CompactBelowPx): the meters+ drop their icons and tighten, as the bar was before the icons. */+.top-bar--compact .meter-icon { display: none; }+.top-bar--compact .meter { padding: 0 8px; }+.top-bar--compact .nav-button { width: 62px; }+.top-bar--compact .nav-disc { left: 6px; }.turn-box { width: 190px; flex-shrink: 1; min-width: 150px; align-items: flex-end; }-.end-turn { -unity-font-definition: url("project://database/Assets/UI/Fonts/EBGaramond-SemiBold.ttf"); font-size: 22px; border-color: var(--gold); }+#attention { font-size: 16px; }+.end-turn {+ -unity-font-definition: url("project://database/Assets/UI/Fonts/EBGaramond-SemiBold.ttf"); font-size: 22px;+ border-color: var(--gold); border-width: 1.5px; color: var(--gold-light); padding: 4px 14px 4px 40px;+}+.end-turn:hover { border-color: var(--gold-light); }/* Event card at the right, info panel at the bottom-left, minimap at the bottom-right. *//* The event card and the minimap share one column (Task 24 review I2): the card can never reach the minimap; when the@@ -87,27 +139,49 @@ Button:disabled { color: var(--ink-dim); border-color: rgba(120, 120, 120, 0.4);#event-options { flex-shrink: 0; }/* Hidden until EventCardPresenter shows an event (never visible while loading). */.event-card { display: none; }-.event-head { flex-direction: row; align-items: flex-start; margin-bottom: 8px; }+/* The card's head is its picture band: a dark plate holding the minister's framed portrait beside the title. */+.event-head {+ flex-direction: row; align-items: center; margin-bottom: 2px; padding: 4px;+ background-color: rgba(5, 9, 18, 0.65); border-width: 1px; border-color: var(--gold-dim); border-radius: 2px;+}.event-heading { flex-grow: 1; flex-shrink: 1; }/* Portrait-shaped, so the whole head shows; EventCardPresenter sets background-position-y from the portrait's focal point. */-.event-image { width: 96px; height: 128px; flex-shrink: 0; margin-right: 12px; background-size: cover; background-color: var(--navy-deep); }-.event-office { white-space: normal; }-/* Options wrap inside the card (playtest 2, P2-2). */+.event-image {+ width: 96px; height: 128px; flex-shrink: 0; margin-right: 12px; background-size: cover; background-color: var(--navy-deep);+ border-width: 1px; border-color: var(--gold);+}+.event-office { white-space: normal; -unity-text-align: middle-center; font-size: 18px; }+/* Options wrap inside the card (playtest 2, P2-2); each has a round gold-rimmed sign at its left, as the promo's choices. */#event-options Button { white-space: normal; -unity-text-align: middle-left; }-.event-title { -unity-text-align: middle-center; margin-bottom: 4px; white-space: normal; font-size: 26px; } /* centred, as before, in its column */+.event-option { min-height: 42px; padding: 5px 12px 5px 46px; margin: 3px 0; border-color: rgba(196, 160, 92, 0.6); }+.event-title { -unity-text-align: middle-center; margin-bottom: 4px; white-space: normal; font-size: 28px; } /* centred, as before, in its column */.event-text { white-space: normal; margin-bottom: 8px; }.draft { display: none; color: var(--down); -unity-font-definition: url("project://database/Assets/UI/Fonts/EBGaramond-SemiBold.ttf"); -unity-text-align: middle-center; }-.info-panel { position: absolute; left: 16px; bottom: 16px; width: 520px; min-height: 160px; }-.minimap { align-self: flex-end; flex-shrink: 0; width: 300px; height: 340px; padding: 6px; }+/* The info panel: the hex's terrain sign (UiIcon on the biome's map colour, InfoPanelPresenter) beside its facts. */+.info-panel { position: absolute; left: 16px; bottom: 16px; width: 520px; min-height: 160px; flex-direction: row; align-items: flex-start; }+.info-thumb {+ width: 92px; height: 116px; flex-shrink: 0; margin-right: 14px; padding: 10px;+ border-width: 1px; border-color: var(--gold); border-radius: 2px; background-color: var(--navy-deep);+}+.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; }+/* Narrow, as the country is: the frame hugs the tall map picture (MinimapPresenter fits it to the content box). */+.minimap { align-self: flex-end; flex-shrink: 0; width: 160px; height: 340px; padding: 12px; background-color: rgba(9, 14, 26, 0.97); }.minimap-image { align-self: center; -unity-background-scale-mode: stretch-to-fill; } /* the element is sized to the picture's aspect by MinimapPresenter */-.minimap-view { position: absolute; border-color: var(--ink); border-width: 1px; }+.minimap-view { position: absolute; border-color: var(--ink); border-width: 1.5px; }/* Full screens (Cabinet, Budget, Defence, Why) open in the centre, one at a time. *//* Hidden until ScreenNav opens one (never visible while loading; playtest 2, P2-1). Right edge clear of the 480px column. */-.screen { display: none; position: absolute; left: 552px; right: 512px; top: 112px; bottom: 16px; }-.screen-header { flex-direction: row; justify-content: space-between; align-items: center; border-bottom-width: 1px; border-color: var(--gold-dim); margin-bottom: 8px; }+.screen { display: none; position: absolute; left: 552px; right: 512px; top: 112px; bottom: 16px; padding: 18px; background-color: rgb(11, 18, 32); } /* opaque: a reading screen, and the map labels must not show through */+.screen-header { flex-direction: row; justify-content: space-between; align-items: center; border-bottom-width: 1px; border-color: var(--gold-dim); margin-bottom: 10px; padding-bottom: 4px; }+/* Screen titles and section names in gold, letter-spaced, as the promo's "DEFENSE" and "LEADERSHIP". */+.screen-header > .title { color: var(--gold-light); letter-spacing: 1px; }+.screen .meter-name { color: var(--gold); letter-spacing: 2px; font-size: 16px; margin-top: 8px; }.row { flex-direction: row; align-items: center; }-.rung { flex-direction: row; padding: 4px 8px; border-left-width: 3px; border-color: rgba(0, 0, 0, 0); }+.rung { flex-direction: row; padding: 5px 10px; margin: 1px 0; border-left-width: 3px; border-color: rgba(0, 0, 0, 0); }.rung-current { border-color: var(--gold); background-color: rgba(196, 160, 92, 0.15); }.grow { flex-grow: 1; }/* A growing row inside a screen (the Cabinet's seats and candidates) takes the height that is left and stretches its@@ -115,16 +189,34 @@ Button:disabled { color: var(--ink-dim); border-color: rgba(120, 120, 120, 0.4);.screen .row.grow { align-items: stretch; flex-basis: 0; flex-shrink: 1; min-height: 0; }.screen .row.grow > .grow { min-height: 0; flex-shrink: 1; }-.toast { display: none; position: absolute; left: 30%; right: 30%; top: 112px; -unity-text-align: middle-center; white-space: normal; }+.toast { display: none; position: absolute; left: 30%; right: 30%; top: 112px; -unity-text-align: middle-center; white-space: normal; border-color: var(--gold); }++/* Scroll bars in the theme: a slim gold thumb on a faint track, no arrow buttons. */+.unity-scroller--vertical { width: 10px; border-width: 0; background-color: rgba(0, 0, 0, 0); margin-left: 4px; }+.unity-scroller--vertical > .unity-scroller__low-button, .unity-scroller--vertical > .unity-scroller__high-button { display: none; }+.unity-scroller--vertical .unity-base-slider__tracker { background-color: rgba(196, 160, 92, 0.10); border-width: 0; border-radius: 5px; }+.unity-scroller--vertical .unity-base-slider__dragger { background-color: rgba(196, 160, 92, 0.55); border-width: 0; border-radius: 5px; }+.unity-scroller--vertical .unity-base-slider__dragger-border { display: none; }-.why-group { -unity-font-definition: url("project://database/Assets/UI/Fonts/EBGaramond-SemiBold.ttf"); color: var(--gold); margin-top: 8px; }+.why-group { -unity-font-definition: url("project://database/Assets/UI/Fonts/EBGaramond-SemiBold.ttf"); color: var(--gold); letter-spacing: 1px; margin-top: 10px; border-bottom-width: 1px; border-color: rgba(196, 160, 92, 0.25); }.why-line { white-space: normal; padding-left: 12px; }-.seat { flex-direction: row; align-items: center; }-.seat-portrait { width: 40px; height: 48px; margin-right: 8px; -unity-background-scale-mode: scale-and-crop; background-color: var(--navy-deep); }-.seat-selected { border-color: var(--gold); }+/* The Cabinet as the promo's portrait cards (promo/final/04): the lineup wraps into a grid of cards, each a gold-framed+ portrait over the office and its holder; a long lineup scrolls. */+#cabinet-seats .unity-scroll-view__content-container { flex-direction: row; flex-wrap: wrap; }+.seat {+ flex-direction: column; align-items: center; justify-content: flex-start; width: 188px; min-height: 250px;+ padding: 8px 8px 10px 8px; margin: 4px; -unity-text-align: upper-center;+}+.seat > Label { white-space: normal; -unity-text-align: upper-center; font-size: 16px; margin-top: 6px; }+.seat-portrait {+ width: 112px; height: 140px; flex-shrink: 0; -unity-background-scale-mode: scale-and-crop; background-position-y: top 20%;+ background-color: var(--navy-deep); border-width: 1px; border-color: var(--gold);+}+.seat-selected { border-color: var(--gold); background-color: var(--navy-raised); }.appointed { color: var(--gold); }-.candidate { flex-direction: row; align-items: center; }+.candidate { flex-direction: column; align-items: stretch; margin-bottom: 4px; }+.candidate > Button { white-space: normal; }.reason { color: var(--ink-dim); font-size: 16px; white-space: normal; flex-shrink: 1; }/* Loading (playtest 2, P2-1): until GameRoot is ready only this line shows; the bar's values, the info panel and the@@ -134,7 +226,7 @@ Button:disabled { color: var(--ink-dim); border-color: rgba(120, 120, 120, 0.4);.root.loading { background-color: var(--navy-solid); } /* the template's navy, not the default sky (final review M1) */.loading .date-box, .loading .meters, .loading .nav, .loading .turn-box, .loading .info-panel, .loading .right-column { visibility: hidden; }-/* Map labels (visual v1 Task 9): the promo's dark pill with a thin gold edge, in EB Garamond SemiBold. Each pill sits in a+/* Map labels (visual v1 Task 9; promo HUD pass: rounder, a firmer gold edge): the promo's dark pill with a thin gold edge, in EB Garamond SemiBold. Each pill sits in azero-size slot that MapLabelsPresenter moves with an inline translate; the anchor class says which corner of the pill sitson the marker's top. Hidden while the game loads. */.map-labels { position: absolute; left: 0; top: 0; right: 0; bottom: 0; }@@ -148,13 +240,13 @@ Button:disabled { color: var(--ink-dim); border-color: rgba(120, 120, 120, 0.4);background-color: rgba(14, 22, 38, 0.82);border-width: 1px;border-color: var(--gold);- border-radius: 12px;- padding: 1px 10px 2px 10px;+ border-radius: 14px;+ padding: 1px 12px 2px 12px;margin: 0;-unity-text-align: middle-center;white-space: nowrap;}-.map-label-city { font-size: 22px; }+.map-label-city { font-size: 23px; color: rgb(250, 242, 224); }.map-label-town, .map-label-arab_town { font-size: 19px; }.anchor-lower-centre { translate: -50% -100%; }.anchor-lower-left { translate: 0 -100%; }