M6.14: Single-column card layout with clade/species descriptions

Switch Step 0 (Clade) and Step 1 (Species) from a 3-column card grid
to a 1-column layout, with each card carrying a codex-voice
description paragraph between the meta line and the trait chips.
Rationale: establish the world's tone before mechanics — the player
reads who Canidae or Wolf-Folk *are* before evaluating ability mods
and trait pills. Trade is more vertical scrolling, but the card
content was already going wider than three columns comfortably
allowed once the parchment theme bumped padding.

Schema: CladeDef and SpeciesDef gain a Description field (string,
empty default). Populated for all 7 clades and 19 species, sourced
from the doc's italicized blockquote + a one-sentence summary of
the prose paragraph that follows. Empty descriptions fall through
silently — a species without a description still renders, just
without the paragraph.

UI: MakeGrid in both steps becomes Columns = 1 with ExpandFill;
BuildCard sets card.SizeFlagsHorizontal = ExpandFill (replaces the
fixed CustomMinimumSize 200) and prepends the autowrap description
label after the meta line. Hybrid mode stacks sire and dam single-
column grids vertically — same logic as before, just one card wide
each.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Christopher Wiebe
2026-05-04 21:47:00 -07:00
parent 067038de45
commit 66055f9549
6 changed files with 69 additions and 8 deletions
+16 -4
View File
@@ -204,9 +204,11 @@ public partial class StepClade : VBoxContainer, IStep
private static GridContainer MakeGrid()
{
var grid = new GridContainer { Columns = 3, SizeFlagsHorizontal = SizeFlags.ShrinkCenter };
grid.AddThemeConstantOverride("h_separation", 16);
grid.AddThemeConstantOverride("v_separation", 16);
// Single-column layout: each card spans the wizard's content width
// and surfaces the clade's description text. Establishes the
// world's tone before mechanics — the trade is more scrolling.
var grid = new GridContainer { Columns = 1, SizeFlagsHorizontal = SizeFlags.ExpandFill };
grid.AddThemeConstantOverride("v_separation", 12);
return grid;
}
@@ -530,7 +532,7 @@ public partial class StepClade : VBoxContainer, IStep
private PanelContainer BuildCard(CladeDef clade, System.Action<string> onClick)
{
var card = CodexCard.Make();
card.CustomMinimumSize = new Vector2(200, 0);
card.SizeFlagsHorizontal = Control.SizeFlags.ExpandFill;
card.GuiInput += (InputEvent e) =>
{
if (e is InputEventMouseButton mb && mb.Pressed && mb.ButtonIndex == MouseButton.Left)
@@ -544,6 +546,16 @@ public partial class StepClade : VBoxContainer, IStep
box.AddChild(new Label { Text = clade.Name, ThemeTypeVariation = "CardName" });
box.AddChild(new Label { Text = clade.Kind.ToUpperInvariant(), ThemeTypeVariation = "CardMeta" });
if (!string.IsNullOrEmpty(clade.Description))
{
box.AddChild(new Label
{
Text = clade.Description,
AutowrapMode = TextServer.AutowrapMode.WordSmart,
MouseFilter = Control.MouseFilterEnum.Pass,
});
}
if (clade.AbilityMods.Count > 0)
{
var modsRow = new HBoxContainer();
+15 -4
View File
@@ -114,9 +114,10 @@ public partial class StepSpecies : VBoxContainer, IStep
private static GridContainer MakeGrid()
{
var grid = new GridContainer { Columns = 3, SizeFlagsHorizontal = SizeFlags.ShrinkCenter };
grid.AddThemeConstantOverride("h_separation", 16);
grid.AddThemeConstantOverride("v_separation", 16);
// Single-column layout: each card spans the wizard's content width
// and surfaces the species' description text. Matches StepClade.
var grid = new GridContainer { Columns = 1, SizeFlagsHorizontal = SizeFlags.ExpandFill };
grid.AddThemeConstantOverride("v_separation", 12);
return grid;
}
@@ -400,7 +401,7 @@ public partial class StepSpecies : VBoxContainer, IStep
private static Control BuildCard(SpeciesDef sp, bool selected, System.Action<string> onClick)
{
var card = CodexCard.Make();
card.CustomMinimumSize = new Vector2(200, 0);
card.SizeFlagsHorizontal = Control.SizeFlags.ExpandFill;
CodexCard.SetSelected(card, selected);
card.GuiInput += (InputEvent e) =>
@@ -420,6 +421,16 @@ public partial class StepSpecies : VBoxContainer, IStep
ThemeTypeVariation = "CardMeta",
});
if (!string.IsNullOrEmpty(sp.Description))
{
box.AddChild(new Label
{
Text = sp.Description,
AutowrapMode = TextServer.AutowrapMode.WordSmart,
MouseFilter = Control.MouseFilterEnum.Pass,
});
}
if (sp.AbilityMods.Count > 0)
{
var modsRow = new HBoxContainer();