JamesBakerMM / TeachAndDraw

A canvas based drawing library and 2d game engine designed purely for teaching an introductory level set of content. Focus is on a smaller command set so students will be able to get familiar with the library quicker.
MIT License
2 stars 3 forks source link

GUI ELEMENTS #36

Open JamesBakerMM opened 7 months ago

JamesBakerMM commented 7 months ago

Need to establish GUI paradigms:

How do GUI elements work, how configurable are they.

Are they fully hardcoded with a single look?

Are they sized and shaped based on present variables?

Is it designed so a student can override the classes methods to hook into it?

JamesBakerMM commented 6 months ago

Following questions, do the GUIS use callbacks at all? (my preference is no, they should use if statements for consistency and leaning into that simple form of programming)

edit: decision has been made for gui elements to be used in the draw loop, not through callbacks. Additional decision made that in future gui elements will be a entity based abstraction layer around the html elements to have them fake behave like canvas elements where possible.

JamesBakerMM commented 6 months ago
JamesBakerMM commented 2 months ago

Following questions, do the GUIS use callbacks at all? (my preference is no, they should use if statements for consistency and leaning into that simple form of programming)

edit: decision has been made for gui elements to be used in the draw loop, not through callbacks. Additional decision made that in future gui elements will be a entity based abstraction layer around the html elements to have them fake behave like canvas elements where possible.

We have since decided to implement the GUI fully in canvas, while its more work it's going to result in much simpler easy to reason through code and have far less counterintuitive behaviours we have to try and hide / mask