Cards Template Editor - nicho92/MtgDesktopCompanion GitHub Wiki
Cards Template Editor — User Help
This help page explains how to use the MtgCardComposer to create, edit, save, export, and share card templates. It focuses on the actual UI interactions: which buttons to press, what each control does, keyboard shortcuts, and troubleshooting for common problems.
Quick start (open, create, save)
- Open: File → Composer, or run card-composer executable.
- New Template:
- Click New (toolbar button).
- Composer opens a blank template and places default regions (Art, Name, Type, Rules, PT).
- Load Template:
- Click Open (folder icon) → choose a
.jsonfile or a supported json archive.
- Click Open (folder icon) → choose a
- Save Template:
- Click Save (floppy disk icon).
- First save prompts for a name and location. Subsequent saves overwrite the selected template file.
- Use Save As to save a copy under a new name or location.
- Export:
- Click Export and save it as Json File.
Main UI overview
- Top toolbar — common actions: New, Open, Save, Save As, Import, Export, Undo, Redo, Zoom, Preview.
- Left toolbox — Add Region (Text, Image, Symbol), Select, Pan, Rotate, Crop.
- Center canvas (Preview) — live WYSIWYG rendering of the card template. Drag to move; handles to resize; right-click for context menu.
- Right Properties Inspector — shows properties for the selected region (position, size, font, color, alignment, placeholders).
- Left Layers panel (collapsible) — lists regions in z-order. Controls: visibility eye, lock padlock, rename, delete, group.
- Bottom status bar — current zoom, coordinates, active layer name, notifications.
Toolbar buttons and interactions
Note: icon labels in parentheses are the typical labels; actual icons may vary.
- New
- Action: Start a new template.
- Interaction: Click → select canvas preset or custom size → OK.
- Open (Folder)
- Action: Load a saved template.
- Interaction: Click → file chooser → select
.templateor.zip→ Composer loads model + images.
- Save (Disk)
- Action: Persist current template to disk (or user templates folder).
- Interaction: Click → if unsaved, choose name/location; if already saved, it writes changes immediately.
- Save As
- Action: Save a copy under a new name/location.
- Interaction: Click → choose new file name/location → Save.
- Import (Down-arrow into document)
- Action: Import assets or another template.
- Interaction: Click → choose import mode (art only / full template). Imported images are added to Assets or referenced in-template depending on option.
- Export
- Action: Produce final outputs.
- Interaction: Click → choose: PNG/JPEG, PDF, ZIP template bundle.
- Export options:
- PNG/JPEG: set DPI (72/150/300), include bleed (toggle), background (transparent/white).
- PDF: single page or sheet layout, include crop marks.
- ZIP template bundle: includes
.templateJSON and embedded images.
- Undo / Redo (↶ / ↷)
- Action: Step backwards/forwards through edits.
- Interaction: Click or use Ctrl+Z / Ctrl+Y.
- Preview (Eye)
- Action: Toggle real-data preview mode (hides editor handles).
- Interaction: Click to switch between editing (handles visible) and preview (clean card).
- Grid / Snap (Grid icon)
- Action: Toggle the snap-to-grid and grid visibility.
- Interaction: Click to show/hide grid; click-and-hold (or settings) to change grid size and snap strength.
- Align (Align icon)
- Action: Align selected regions (left/center/right/top/middle/bottom) and distribute evenly.
- Interaction: Select multiple regions → click Align → choose alignment.
- Group / Ungroup
- Action: Treat multiple regions as one object for moving/resizing.
- Interaction: Select multiple → Group (Ctrl+G); Ungroup to break them apart.
- Lock / Unlock (Padlock)
- Action: Prevent accidental moves/edits for a region.
- Interaction: Select region or click padlock in Layers panel. Locked regions show a lock icon and cannot be selected on canvas unless unlocked.
- Bring Forward / Send Backward (stack arrows)
- Action: Adjust z-order of selected region.
- Interaction: Click to move up/down layers or choose Bring to Front / Send to Back.
Selection, moving, resizing, and editing regions
- Select:
- Single click selects a region. Shift+click toggles additional selections.
- Drag a selection rectangle to select multiple.
- Move:
- Click and drag a region on the canvas.
- Nudge with arrow keys: 1px per press. Hold Shift+arrow for 10px increments.
- Resize:
- Drag corner/edge handles. Hold Shift to preserve aspect ratio for image regions.
- Rotate:
- Use rotate handle (if present) or the rotate field in the Properties Inspector.
- Context menu (right-click on region):
- Options: Edit properties, Duplicate, Delete, Lock/Unlock, Export region (PNG), Crop image (for image regions).
- Text editing:
- Double-click a text region to open inline edit mode or use the Text editor in the Properties panel to edit placeholder text and see live wrapping.
Properties Inspector (fields and behaviour)
When you select a region, the inspector shows editable properties:
- General
- ID / Name — rename for easier identification.
- Visible — toggle region visibility.
- Locked — toggle to prevent edits.
- Position & Size
- X, Y, Width, Height — numeric inputs. Click to type precise values or use small up/down arrows to increment.
- Unit: pixels (default) or mm/inches when a print unit is selected.
- Appearance (text regions)
- Font family, Style (Bold/Italic), Size — preview shows sample text.
- Color — color picker with hex value and eyedropper tool.
- Alignment — left/center/right and vertical alignment.
- Line height, Letter spacing, Padding.
- Text placeholder — choose a placeholder key (Name, ManaCost, Rules, Type, Power, Toughness, Custom).
- Wrapping: Autofit (shrink to fit) / Multi-line wrap / Truncate.
- Appearance (image regions)
- Scale mode: Fit / Fill / Stretch / Center.
- Crop tool — opens cropping UI.
- Opacity / Blend mode.
- Fallback image — used if no art is provided.
- Symbol regions
- Select set symbol or rarity glyph, size, and anchor.
- Advanced
- z-index, composite blending, clipping mask, transform (rotation, skew).
- Actions
- Duplicate, Delete, Export region as PNG, Convert to group.
Templates browser: save, load, and managing templates
- Built-in vs. User templates: The browser shows both and lets you favorite templates.
- Save:
- Click Save → choose Save or Save As.
- Metadata: name, author, description, tags. Fill these before final save for easier searching.
- Export template bundle (recommended for sharing):
- Use Export → Template Bundle (.zip). This embeds the
.templateJSON and all referenced images (avoids broken image paths when importing elsewhere).
- Use Export → Template Bundle (.zip). This embeds the
- Import:
- Use Import → choose
.templateor.zipbundle. Composer will copy embedded images into the template's asset store.
- Use Import → choose
- Versioning:
- Composer keeps a local undo history. For file-level versioning, use Save As with a new filename or export with a date suffix (e.g., MyTemplate_v1.template).
- Revert:
- If you want to revert to last saved state: File → Revert to Saved.
Export formats & options (details)
- PNG
- Use for single card images or preview images.
- Options: DPI, include bleed, crop marks, background (transparent/white).
- Multi-card export: select multiple templates and choose a grid layout (rows × columns) to export sheets.