jalovatt / scythe

Lua GUI library and utility framework for Reaper scripts (formerly Lokasenna_GUI)
https://jalovatt.github.io/scythe
MIT License
26 stars 6 forks source link

Element redesign #136

Open jalovatt opened 5 years ago

jalovatt commented 5 years ago

Some features, such as dynamic resizing and layer-based positioning, are currently impractical due to the elements being completely in charge of their positioning and size.

Problems

  1. Elements are completely in charge of their position and dimensions
  2. Elements have internal graphics helpers that work in pixel values
  3. Window:update, and therefore the mouse state passed in to elements, has no way of knowing the position of a mouse event relative to its containing element
  4. Some elements do important setup in their new or init methods that relies on their current dimensions (i.e. sliders' handles)
  5. Some elements do logic in their draw methods (I think Label fading, for one)
  6. The Window needs an onResize handler to manage the current scale (x/y should be separate)

Ideas