Add component instance with general methods. New component constructor

This commit is contained in:
Insality
2020-01-30 01:46:02 +03:00
parent 0542ec4e69
commit ae47bcee8f
22 changed files with 156 additions and 114 deletions

View File

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