Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A way to access widgets by ID / mainly canvas #90

Open
dacap opened this issue Dec 16, 2022 · 0 comments
Open

A way to access widgets by ID / mainly canvas #90

dacap opened this issue Dec 16, 2022 · 0 comments
Labels

Comments

@dacap
Copy link
Member

dacap commented Dec 16, 2022

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

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant