M6.16: Unified hybrid species grid + codex-styled hover popover
StepSpecies hybrid mode now uses one grid combining sire-clade species (under a "SIRE — <Clade>" eyebrow) and dam-clade species (under "DAM — <Clade>"). Cards are click-to-select like the purebred path — since clades are guaranteed disjoint by StepClade's parent-conflict rule, the lineage is implicit from the species' clade and no per-card toggles are needed. Hover popover now picks up the codex theme: parchment Bg2 panel with a gild border, rounded 14px corners, and soft drop shadow; H3 display serif title, mono Eyebrow tag, CardBody description. Detriment popovers swap to a 3px seal-red border via the panel_detriment stylebox override (replaces the old red Modulate hack). Theme propagation fix: CanvasLayer breaks Godot's Control theme inheritance, so the popup was rendering on Godot defaults. _Ready defers a lookup of the parent Control's theme and assigns it directly to the popup so the codex parchment + Cormorant/CrimsonPro fonts actually resolve. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -106,12 +106,19 @@ public static class CodexTheme
|
||||
cardSelected.ShadowOffset = new Vector2(0, 14);
|
||||
theme.SetStylebox("panel_selected", "Card", cardSelected);
|
||||
|
||||
// Popover frame — gild border + soft shadow. Matches .trait-hint.
|
||||
// Popover frame — gild border + soft shadow + rounded corners.
|
||||
// Matches .trait-hint, with a softer corner radius than the rest of
|
||||
// the codex (cards/buttons use 2px sharp) so the floating reveal
|
||||
// reads as a friendlier secondary surface.
|
||||
theme.SetTypeVariation("CodexPopover", "PanelContainer");
|
||||
var popover = new StyleBoxFlat
|
||||
{
|
||||
BgColor = p.Bg2,
|
||||
BorderColor = p.Gild,
|
||||
CornerRadiusTopLeft = 14,
|
||||
CornerRadiusTopRight = 14,
|
||||
CornerRadiusBottomLeft = 14,
|
||||
CornerRadiusBottomRight = 14,
|
||||
ContentMarginLeft = 16,
|
||||
ContentMarginRight = 16,
|
||||
ContentMarginTop = 14,
|
||||
@@ -120,11 +127,14 @@ public static class CodexTheme
|
||||
ShadowSize = 18,
|
||||
ShadowOffset = new Vector2(0, 12),
|
||||
};
|
||||
popover.SetBorderWidthAll(1);
|
||||
popover.SetBorderWidthAll(2);
|
||||
theme.SetStylebox("panel", "CodexPopover", popover);
|
||||
|
||||
// Detriment swap — seal-red border drawn at 3px so the warning reads
|
||||
// unambiguously against the parchment bg even at a glance.
|
||||
var popoverDetriment = (StyleBoxFlat)popover.Duplicate();
|
||||
popoverDetriment.BorderColor = p.Seal;
|
||||
popoverDetriment.SetBorderWidthAll(3);
|
||||
theme.SetStylebox("panel_detriment", "CodexPopover", popoverDetriment);
|
||||
|
||||
// Pill — small trait/skill chip. Mirrors .trait-chips .t-name from
|
||||
|
||||
Reference in New Issue
Block a user