mirror of
https://github.com/Insality/druid.git
synced 2025-06-27 10:27:47 +02:00
27 lines
519 B
Lua
27 lines
519 B
Lua
local component = require("druid.component")
|
|
|
|
---@class component_name : druid.base_component
|
|
local Component = component.create("component_name")
|
|
|
|
local SCHEME = {
|
|
ROOT = "root",
|
|
BUTTON = "button",
|
|
}
|
|
|
|
|
|
function Component:init(template, nodes)
|
|
self:set_template(template)
|
|
self:set_nodes(nodes)
|
|
self.root = self:get_node(SCHEME.ROOT)
|
|
self.druid = self:get_druid()
|
|
|
|
self.button = self.druid:new_button(SCHEME.BUTTON, function() end)
|
|
end
|
|
|
|
|
|
function Component:on_remove()
|
|
end
|
|
|
|
|
|
return Component
|