mirror of
https://github.com/Insality/druid.git
synced 2025-09-27 18:12:19 +02:00
Update
This commit is contained in:
@@ -1,22 +0,0 @@
|
||||
--- For component interest functions
|
||||
--- 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}")
|
||||
--- And create this component via:
|
||||
--- $ self.{COMPONENT_TYPE} = self.druid:new({COMPONENT_NAME}, template, nodes)
|
||||
|
||||
local component = require("druid.component")
|
||||
|
||||
---@class {COMPONENT_TYPE}: druid.base_component
|
||||
---@field druid druid_instance{COMPONENT_ANNOTATIONS}
|
||||
local M = component.create("{COMPONENT_TYPE}")
|
||||
|
||||
|
||||
---@param template string
|
||||
---@param nodes table<hash, node>
|
||||
function M:init(template, nodes)
|
||||
self.druid = self:get_druid(template, nodes){COMPONENT_DEFINE}
|
||||
end
|
||||
|
||||
{COMPONENT_FUNCTIONS}
|
||||
return M
|
Reference in New Issue
Block a user