aseprite / aseprite/api

A way to access widgets by ID / mainly canvas

Open
#90 0 comments 0 reactions 0 assignees View on GitHub
feature
Dominant language
No language data
Stars
307
Forks
68
PR merge metrics
No merged PRs in 30d

Description

We should have a way to access widgets by ID. Mainly a canvas to paint some part of its surface. E.g.

```lua
local d = Dialog():canvas{ id=myCanvas }
local ctx = d.widgets.myCanvas.context
-- ... paint in the ctx ...
```

At the moment the only way to paint in the canvas is using the `onpaint` event and triggering that event through `Dialog:paint()` (but the `onpaint` should be a way to redraw the entire canvas in case of resize, we cached the surface on a offscreen bitmap).

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.