TableTower/templates/counter.json
RobinFiredrake 9fdf65c00b Group cards and templates
Groups: an optional groups list on a collection (frame rect, collapsed,
members, details), saved by TowerBoard and kept by JsonIO. Expanded groups
draw a frame behind their cards with a title bar; collapsed ones become one
compact card that lists the members' lit results, with pipes re-routed to
its inlet and right edge. Build mode adds multi-select (Ctrl/Shift-click,
Ctrl-drag), Group (Ctrl+G), drop in/out of frames, rename, ungroup, delete
with undo and a details editor.

Templates: TemplateKit saves cards, groups or selections with relative
positions, internal pipes and outside pipes by name, detects {$name}
parameters and inserts with fresh ids. TemplateLibrary keeps user templates
in user://templates and lists the built-in ones in templates/.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-08 17:01:34 -06:00

39 lines
1.2 KiB
JSON
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

{
"format_version": 1,
"name": "Counter",
"description": "A number variable and a card that adds one, takes one away or resets it. Read the variable in any expression, or show it in text with {@name}.",
"kind": "group",
"params": [
{"name": "label", "label": "Name shown on the cards", "default": "Counter"},
{"name": "name", "label": "Variable name (lowercase, no @)", "default": "counter"},
{"name": "start", "label": "Starting value", "default": "0"}
],
"tables": [
{
"id": "var",
"name": "{$label}",
"kind": "variable",
"var_name": "{$name}",
"initial": "{$start}",
"x": 22,
"y": 68,
"entries": []
},
{
"id": "change",
"name": "Change {$label}",
"kind": "choice",
"prompt": "{$label} is {@{$name}}. Change it?",
"x": 342,
"y": 68,
"entries": [
{"id": "e1", "text": "+1", "effects": "@{$name} += 1"},
{"id": "e2", "text": "−1", "effects": "@{$name} -= 1"},
{"id": "e3", "text": "Reset", "effects": "reset @{$name}"}
]
}
],
"groups": [
{"name": "{$label}", "x": 0, "y": 0, "w": 620, "h": 300, "members": ["var", "change"]}
]
}