mirror of
https://github.com/Insality/druid.git
synced 2025-09-27 10:02:18 +02:00
Update Rich Input with selection/arrows control. Add template and nodes to self:get_druid
This commit is contained in:
@@ -11,10 +11,8 @@ local SCHEME = {
|
||||
|
||||
-- Component constructor. Template name and nodes are optional. Pass it if you use it in your component
|
||||
function Component:init(template, nodes)
|
||||
self:set_template(template)
|
||||
self:set_nodes(nodes)
|
||||
self.druid = self:get_druid(template, nodes)
|
||||
self.root = self:get_node(SCHEME.ROOT)
|
||||
self.druid = self:get_druid()
|
||||
|
||||
self.button = self.druid:new_button(SCHEME.BUTTON, function() end)
|
||||
end
|
||||
|
@@ -13,16 +13,13 @@ local SCHEME = {
|
||||
-- Component constructor. Template name and nodes are optional. Pass it if you use it in your component
|
||||
function Component:init(template, nodes)
|
||||
-- If your component is gui template, pass the template name and set it
|
||||
self:set_template(template)
|
||||
|
||||
-- If your component is cloned my gui.clone_tree, pass nodes to component and set it
|
||||
self:set_nodes(nodes)
|
||||
-- Use inner druid instance to create components inside this component
|
||||
self.druid = self:get_druid(template, nodes)
|
||||
|
||||
-- self:get_node will auto process component template and nodes
|
||||
self.root = self:get_node(SCHEME.ROOT)
|
||||
|
||||
-- Use inner druid instance to create components inside this component
|
||||
self.druid = self:get_druid()
|
||||
end
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user