Start update examples to move control things to example itself

This commit is contained in:
Insality
2025-03-29 19:53:11 +02:00
parent d6fb8cad09
commit e1339a2ca8
7 changed files with 107 additions and 87 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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