Remove register and update examples

This commit is contained in:
Insality
2024-11-21 00:28:53 +02:00
parent 4ef65579a6
commit bc0ada7098
44 changed files with 78 additions and 668 deletions

View File

@@ -1,7 +1,5 @@
local helper = require("druid.helper")
local component = require("druid.component")
local container = require("example.components.container.container")
local lang_text = require("druid.extended.lang_text")
---@class basic_text: druid.base_component
---@field druid druid_instance
@@ -16,7 +14,7 @@ function M:init(template, nodes)
self.text = self.druid:new_text("text")
-- This code is for adjustable text area with mouse
self.container = self.druid:new(container, "text_area", nil, function(_, size)
self.container = self.druid:new_container("text_area", nil, function(_, size)
self.text:set_size(size)
self:refresh_text_position()
end) --[[@as druid.container]]

View File

@@ -1,6 +1,5 @@
local helper = require("druid.helper")
local component = require("druid.component")
local container = require("example.components.container.container")
---@class multiline_text: druid.base_component
---@field root node
@@ -16,7 +15,7 @@ function M:init(template, nodes)
self.text = self.druid:new_text("text")
-- This code is for adjustable text area with mouse
self.container = self.druid:new(container, "text_area", nil, function(_, size)
self.container = self.druid:new_container("text_area", nil, function(_, size)
self.text:set_size(size)
self:refresh_text_position()
end) --[[@as druid.container]]