diff --git a/app/assets/css/main.css b/app/assets/css/main.css index e2503c4..b8afe5f 100644 --- a/app/assets/css/main.css +++ b/app/assets/css/main.css @@ -878,6 +878,19 @@ kbd { fill: var(--muted); } +.cable-choices .cable-row { + display: flex; + flex-wrap: wrap; + align-items: center; + gap: 4px; + margin-bottom: 4px; +} + +.cable-choices .cable-row .hint { + width: 84px; + margin: 0; +} + .invert-pins { display: flex; flex-wrap: wrap; diff --git a/app/components/editor/Help.vue b/app/components/editor/Help.vue index ee99466..a2eb93a 100644 --- a/app/components/editor/Help.vue +++ b/app/components/editor/Help.vue @@ -23,6 +23,7 @@ const SHORTCUTS: [string, string][] = [ ['Mouse wheel', 'Zoom'], ['N, I, O, L, B, C, H, T, P, X', 'Place NAND, input, output, lamp, button, clock, hex display, note, input panel, pixel'], ['Select wires, Ctrl+G', 'Bundle them into one cable; an end whose wires all meet one part plugs straight into it'], + ['Right click a component, Cable from outputs', 'A cable plugged onto S0–S3 (or any group); drop its free end on the next part\'s pins'], ['Drag a plugged cable end away', 'Pull it out; drop its pins on a part\'s pins to plug it in again'], ['Drag a part onto a pin', 'Connects there when dropped (a green ring shows where); hold Alt to just place it'], ['Drag a wire by its end', 'Moves that end to another pin (grab it near the pin, or by the small circle)'], diff --git a/app/components/editor/NodeSettings.vue b/app/components/editor/NodeSettings.vue index b967c66..bc461bf 100644 --- a/app/components/editor/NodeSettings.vue +++ b/app/components/editor/NodeSettings.vue @@ -148,6 +148,9 @@ const widens = computed(() => { }) const inputs = computed(() => inputCount(n.value, ed.getDef.value)) +/** Groups of pins a new cable can plug onto. */ +const cables = computed(() => ed.cableChoices(n.value)) + /** Inputs that can carry a bubble, with their names. */ const invertible = computed(() => { if (!INVERTIBLE.has(n.value.kind)) return [] @@ -407,6 +410,18 @@ function setRowHz(row: PanelRow, e: Event) {

Kept inside: in a component the switches stay as set here, buttons read 0.

+
+ Plug a cable onto its pins +
+ From outputs + +
+
+ Into inputs + +
+
+