New component library at client/ui/implant/: - ImplantTheme: shared Resource with colors, spacing, font sizes - ImplantPanel: PanelContainer root with themed background/border - ImplantHeader: title + subtitle - ImplantSeparator: themed horizontal rule with above/below spacing - ImplantDataRow: single-line text with optional color override - ImplantTextBlock: RichTextLabel for wrapping narrative text - default_implant.tres: default theme resource Star map info panel refactored from 140 lines of manual draw_string calls to 50 lines of component composition via _rebuild_info_panel(). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
47 lines
2.1 KiB
GDScript
47 lines
2.1 KiB
GDScript
class_name ImplantTheme
|
|
extends Resource
|
|
## Shared styling resource for all implant UI panels (D-169).
|
|
## Swap this resource at runtime to change the implant's visual identity
|
|
## (hardware variants, upgrades, faction overlays).
|
|
|
|
# ── Colors ───────────────────────────────────────────────────────────────────
|
|
|
|
## Primary readable text
|
|
@export var text_primary: Color = Color("#c8d0e0")
|
|
## Labels, metadata, captions
|
|
@export var text_dim: Color = Color("#667788")
|
|
## Selected, active, interactive highlight
|
|
@export var accent_active: Color = Color("#f0d060")
|
|
## Good state, opportunity, profit
|
|
@export var accent_positive: Color = Color("#44aa66")
|
|
## Danger, loss, hostile
|
|
@export var accent_negative: Color = Color("#aa4444")
|
|
## Caution, degraded, unknown
|
|
@export var accent_warning: Color = Color("#aa8844")
|
|
## Panel background
|
|
@export var panel_bg: Color = Color(0.05, 0.08, 0.14, 0.92)
|
|
## Panel border and separator lines
|
|
@export var separator: Color = Color(0.78, 0.82, 0.88, 0.12)
|
|
## Hover state background
|
|
@export var hover_bg: Color = Color(0.78, 0.82, 0.88, 0.08)
|
|
|
|
# ── Spacing ──────────────────────────────────────────────────────────────────
|
|
|
|
## Line height for single-line labels (baseline to baseline)
|
|
@export var line_height: int = 18
|
|
## Space from last text baseline to separator line
|
|
@export var sep_above: int = 6
|
|
## Space from separator line to next text baseline
|
|
@export var sep_below: int = 12
|
|
## Panel internal padding
|
|
@export var padding: int = 12
|
|
## Border width
|
|
@export var border_width: float = 1.0
|
|
|
|
# ── Font sizes ───────────────────────────────────────────────────────────────
|
|
|
|
@export var font_header: int = 15
|
|
@export var font_body: int = 11
|
|
@export var font_small: int = 10
|
|
@export var font_caption: int = 9
|