Update druid component template

This commit is contained in:
Insality
2024-10-15 00:56:19 +03:00
parent 87f52551e2
commit a0113d3356
3 changed files with 22 additions and 28 deletions

View File

@@ -1,9 +1,9 @@
--- For component interest functions
--- see https://github.com/Insality/druid/blob/develop/docs_md/02-creating_custom_components.md
--- see https://github.com/Insality/druid/blob/master/docs_md/02-creating_custom_components.md
--- Require this component in you gui file:
--- local {COMPONENT_NAME} = require("{COMPONENT_PATH}")
--- $ local {COMPONENT_NAME} = require("{COMPONENT_PATH}")
--- And create this component via:
--- self.{COMPONENT_TYPE} = self.druid:new({COMPONENT_NAME}, template, nodes)
--- $ self.{COMPONENT_TYPE} = self.druid:new({COMPONENT_NAME}, template, nodes)
local component = require("druid.component")
@@ -11,10 +11,6 @@ local component = require("druid.component")
---@field druid druid_instance{COMPONENT_ANNOTATIONS}
local M = component.create("{COMPONENT_TYPE}")
local SCHEME = {
{SCHEME_LIST}
}
---@param template string
---@param nodes table<hash, node>
@@ -22,9 +18,5 @@ function M:init(template, nodes)
self.druid = self:get_druid(template, nodes){COMPONENT_DEFINE}
end
function M:on_remove()
end
{COMPONENT_FUNCTIONS}
return M