Files
settled-reach/client/ui/implant/implant_separator.gd
T
jpmschweitzerandClaude Opus 4.6 962596fd57 feat(ui): implant component library + star map refactor (D-169)
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>
2026-04-05 10:47:23 +02:00

29 lines
493 B
GDScript

@tool
class_name ImplantSeparator
extends Control
## Thin horizontal separator line with themed spacing.
var _theme: ImplantTheme
func _init() -> void:
mouse_filter = Control.MOUSE_FILTER_IGNORE
func apply_implant_theme(t: ImplantTheme) -> void:
_theme = t
custom_minimum_size.y = t.sep_above + t.sep_below
queue_redraw()
func _draw() -> void:
if not _theme:
return
var y: float = _theme.sep_above
draw_line(
Vector2(0, y),
Vector2(size.x, y),
_theme.separator,
1.0
)