Update Rich Input with selection/arrows control. Add template and nodes to self:get_druid

This commit is contained in:
Insality
2024-09-07 17:15:40 +03:00
parent f93d0c7d40
commit 986a4695f6
18 changed files with 380 additions and 90 deletions

View File

@@ -7,8 +7,8 @@
local component = require("druid.component")
---@class {COMPONENT_TYPE}: druid.base_component{COMPONENT_ANNOTATIONS}
---@field druid druid_instance
---@class {COMPONENT_TYPE}: druid.base_component
---@field druid druid_instance{COMPONENT_ANNOTATIONS}
local M = component.create("{COMPONENT_TYPE}")
local SCHEME = {
@@ -19,9 +19,7 @@ local SCHEME = {
---@param template string
---@param nodes table<hash, node>
function M:init(template, nodes)
self:set_template(template)
self:set_nodes(nodes)
self.druid = self:get_druid(){COMPONENT_DEFINE}
self.druid = self:get_druid(template, nodes){COMPONENT_DEFINE}
end