Update docs

This commit is contained in:
Insality 2025-04-26 12:42:30 +03:00
parent 4f8be6ebdb
commit 336694cd1d
2 changed files with 3 additions and 3 deletions

View File

@ -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: You can also use the root node ID or node directly, it will be cloned and used as a template:
```lua ```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 -- or
self.my_widget = self.druid:new_widget(best_widget_in_the_world, "best_widget_in_the_world", self.prefab) self.my_widget = self.druid:new_widget(best_widget_in_the_world, "best_widget_in_the_world", self.prefab)
``` ```

View File

@ -126,8 +126,8 @@ function init(self)
-- In case we want to clone it and use several times we can pass the nodes table -- In case we want to clone it and use several times we can pass the nodes table
local array_of_widgets = {} local array_of_widgets = {}
for index = 1, 10 do for index = 1, 10 do
-- For widgets now we can use a root node directly instead of manually cloning the nodes -- 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", "my_widget/root") local widget = self.druid:new_widget(my_widget, "my_widget", "root")
table.insert(array_of_widgets, widget) table.insert(array_of_widgets, widget)
end end
end end