diff --git a/ui/pipe_batch.gd b/ui/pipe_batch.gd index c5c8019..ab824b1 100644 --- a/ui/pipe_batch.gd +++ b/ui/pipe_batch.gd @@ -63,13 +63,16 @@ static func coarse(rid: RID, pts: PackedVector2Array, color: Color, width: float ## An unlit thread (as PipeLayer._draw_pipe draws it), in its own canvas item. ## `own` is the thread's own colour ("" = the theme's THREAD). -func add_pipe(pts: PackedVector2Array, hovered: bool, own: String = "") -> void: +func add_pipe(pts: PackedVector2Array, hovered: bool, own: String = "", selected: bool = false) -> void: var rid := item() var color := Color.from_string(own, Style.THREAD) if own != "" else Style.THREAD var dark := color.darkened(0.6) if own != "" else Style.THREAD_DARK if far: coarse(rid, pts, color, 10.0) return + if selected: # the glow selected cards have (TableCardSkin) + line(rid, pts, Color(Style.SELECTED, 0.3), 26.0) + line(rid, pts, Style.SELECTED, 15.0) if ThreadStrip.active: ThreadStrip.active.add_to(rid, pts, color.lightened(0.35) if hovered else color, dark) ThreadStrip.active.add_pins(item(), pts) diff --git a/ui/pipe_layer.gd b/ui/pipe_layer.gd index 79d238a..14002f2 100644 --- a/ui/pipe_layer.gd +++ b/ui/pipe_layer.gd @@ -158,7 +158,7 @@ func _draw() -> void: elif rerouted: _batch.add_bundle(pts) else: - _batch.add_pipe(pts, build and (key == hover_key or key == select_key), str(e.pipe_color.get(to, ""))) + _batch.add_pipe(pts, build and (key == hover_key or key == select_key), str(e.pipe_color.get(to, "")), build and key == select_key) if not is_ref and not rerouted: var tag := RulesView.pipe_label(e, to, main.data, plain) if tag != "":