mirror of
https://github.com/Insality/druid
synced 2025-09-27 18:12:21 +02:00
Start update examples to move control things to example itself
This commit is contained in:
@@ -8,4 +8,22 @@ function M:init()
|
||||
end)
|
||||
end
|
||||
|
||||
|
||||
---@param output_log output_list
|
||||
function M:on_example_created(output_log)
|
||||
self.button.on_click:subscribe(function()
|
||||
output_log:add_log_text("Button Clicked")
|
||||
end)
|
||||
end
|
||||
|
||||
|
||||
---@param properties_panel properties_panel
|
||||
function M:properties_control(properties_panel)
|
||||
local checkbox = properties_panel:add_checkbox("ui_enabled", false, function(value)
|
||||
self.button:set_enabled(value)
|
||||
end)
|
||||
checkbox:set_value(true)
|
||||
end
|
||||
|
||||
|
||||
return M
|
||||
|
@@ -12,4 +12,16 @@ function M:init()
|
||||
end)
|
||||
end
|
||||
|
||||
|
||||
---@param output_log output_list
|
||||
function M:on_example_created(output_log)
|
||||
self.button.on_click:subscribe(function()
|
||||
output_log:add_log_text("Clicked")
|
||||
end)
|
||||
self.button.on_double_click:subscribe(function()
|
||||
output_log:add_log_text("Double Clicked")
|
||||
end)
|
||||
end
|
||||
|
||||
|
||||
return M
|
||||
|
@@ -39,4 +39,16 @@ function M:init()
|
||||
end)
|
||||
end
|
||||
|
||||
|
||||
---@param output_log output_list
|
||||
function M:on_example_created(output_log)
|
||||
self.button.on_click:subscribe(function()
|
||||
output_log:add_log_text("Clicked")
|
||||
end)
|
||||
self.button.on_long_click:subscribe(function()
|
||||
output_log:add_log_text("On long click")
|
||||
end)
|
||||
end
|
||||
|
||||
|
||||
return M
|
||||
|
Reference in New Issue
Block a user