Add component instance with general methods. New component constructor

This commit is contained in:
Insality
2020-01-30 01:46:02 +03:00
parent 0542ec4e69
commit ae47bcee8f
22 changed files with 156 additions and 114 deletions

View File

@@ -71,7 +71,7 @@ function M.new(component_script, style)
end
local self = setmetatable({}, { __index = druid_instance })
-- Druid context here (who created druid)
-- Usually gui_script, but can be component from helper.get_druid(component)
-- Usually gui_script, but can be component from self:get_druid()
self._context = component_script
self._style = style or default_style
return self