I’ve always thought this paradigm deserved consideration.
Proposed is a UI library that is as simple to use as Codea’s ellipse(...) and rect(...) functions. I’m particularly curious what @John and @Simeon think, because they established that paradigm in the first place.
To be explicit:
- UI elements could be created with a single statement in the
draw()function - Their style would be controlled the same way as all other Codea shapes, by setting
stroke(...)andfill(...), etc. - By using the same paradigms as existing Codea graphics functions, it would be easy for people to grasp
Here’s an example of how it might be done:
https://gist.github.com/DolenzSong/8b763712b687fb0d282f4c25483b0a47
(The project also includes a modest WYSIWYG feature in that the buttons can be manually positioned. It admittedly has many shortcomings, the biggest being the lack of rounded corners, but I think the principle is displayed well. This is an update of an old project, to be sure, but since UI is being discussed again, I thought it might be appropriate to bring it up.)