mirror of
https://github.com/Insality/druid
synced 2025-06-27 10:27:48 +02:00
18 lines
469 B
Lua
18 lines
469 B
Lua
local component = require("druid.component")
|
|
|
|
---@class basic_rich_text: druid.base_component
|
|
---@field druid druid.instance
|
|
---@field rich_text druid.rich_text
|
|
local M = component.create("basic_rich_text")
|
|
|
|
|
|
---@param template string
|
|
---@param nodes table<hash, node>
|
|
function M:init(template, nodes)
|
|
self.druid = self:get_druid(template, nodes)
|
|
self.druid:new_rich_text("text", "Hello, I'm a <font=text_bold><color=E48155>Rich Text</font></color>!")
|
|
end
|
|
|
|
|
|
return M
|