da1nerd / gui.cr

A UI library written in crystal
MIT License
10 stars 0 forks source link

Add a build step to components so they can be composed with access to the root display #21

Closed da1nerd closed 3 years ago

da1nerd commented 3 years ago

There needs to be a way to pass the display to components so that we can compose complex components, some of which may need access to the display. def build(display : GUI::Display) can be called when the display is loading constraints into the system.

The display constraints should be loaded last in this case because it's possible that a child component will add a constraint to the display.