Update example with new brand one

This commit is contained in:
Insality
2024-10-17 01:24:15 +03:00
parent 2c762716bb
commit 91879509a0
197 changed files with 36779 additions and 7 deletions

View File

@@ -0,0 +1,23 @@
local component = require("druid.component")
---@class basic_button_double_click: druid.base_component
---@field druid druid_instance
---@field button druid.button
local M = component.create("basic_button_double_click")
---@param template string
---@param nodes table<hash, node>
function M:init(template, nodes)
self.druid = self:get_druid(template, nodes)
self.button = self.druid:new_button("button/root", function()
print("Click")
end)
self.button.on_double_click:subscribe(function()
print("Double click")
end)
end
return M