I’m building a UI library for my projects and I’m trying to imitate the Corona APIs. For example, if I would like to create a button then I could use this code:
local button = elements.newButton(options)
As of now I have everything in a single file like this:
local elements = {} elements.newButton = function(options) -- Bla bla end elements.newInputField = function(options) -- Bla bla end -- etc. return elements
But I would like to separate it. How would you do it? How does Corona do it? Do you have separate files that add functions to that module?