mirror of
https://github.com/Insality/druid.git
synced 2025-06-27 02:17:52 +02:00
Update docs
This commit is contained in:
parent
4f8be6ebdb
commit
336694cd1d
@ -185,7 +185,7 @@ end
|
||||
You can also use the root node ID or node directly, it will be cloned and used as a template:
|
||||
|
||||
```lua
|
||||
self.my_widget = self.druid:new_widget(best_widget_in_the_world, "best_widget_in_the_world", "best_widget_in_the_world/root")
|
||||
self.my_widget = self.druid:new_widget(best_widget_in_the_world, "best_widget_in_the_world", "root")
|
||||
-- or
|
||||
self.my_widget = self.druid:new_widget(best_widget_in_the_world, "best_widget_in_the_world", self.prefab)
|
||||
```
|
||||
|
@ -126,8 +126,8 @@ function init(self)
|
||||
-- In case we want to clone it and use several times we can pass the nodes table
|
||||
local array_of_widgets = {}
|
||||
for index = 1, 10 do
|
||||
-- For widgets now we can use a root node directly instead of manually cloning the nodes
|
||||
local widget = self.druid:new_widget(my_widget, "my_widget", "my_widget/root")
|
||||
-- For widgets now we can use a root node inside my_widget directly instead of manually cloning the nodes
|
||||
local widget = self.druid:new_widget(my_widget, "my_widget", "root")
|
||||
table.insert(array_of_widgets, widget)
|
||||
end
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user