Skip to content

Feature: Add "Take Screenshot" button in settings panel #1

Description

@skkdevcraft

Add a "Take Screenshot" control to the settings panel that exports the current WebGL canvas as a PNG (study-{date}.png), excluding UI overlays.

Requirements:

  1. Register an 'action'-type setting (or equivalent) in the settings registry so the button is auto-generated alongside other controls.
  2. Wire it to downloadScreenshot() from src/viewer/screenshot.ts.
  3. Follow the settings architecture — no manual URL handling, no ad-hoc UI.
  4. The button should be a native (44×44px minimum touch target, mobile-friendly).
  5. Screenshot captures only the canvas — UI elements excluded (as specified in docs).

Already in place:

  • src/viewer/screenshot.ts implements captureScreenshot() and downloadScreenshot()
  • Settings registry (src/settings/registry.ts) and UI generation (src/settings/ui.ts) are ready for a new entry
  • The type field may need 'action' added to SettingDefinition

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions