mirror of
https://github.com/Insality/druid
synced 2025-09-27 18:12:21 +02:00
Add component instance with general methods. New component constructor
This commit is contained in:
@@ -3,16 +3,14 @@
|
||||
|
||||
local helper = require("druid.helper")
|
||||
local const = require("druid.const")
|
||||
local component = require("druid.system.component")
|
||||
|
||||
local M = {}
|
||||
M.interest = {
|
||||
const.ON_SWIPE
|
||||
}
|
||||
local M = component.new("slider", { const.ON_SWIPE })
|
||||
|
||||
|
||||
local function on_change_value(self)
|
||||
if self.callback then
|
||||
self.callback(self.context, self.value)
|
||||
self.callback(self:get_context(), self.value)
|
||||
end
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user