Add druid events in components

This commit is contained in:
Insality
2020-02-24 09:34:16 +03:00
parent a81d49de9d
commit ac2bbc29d3
15 changed files with 1019 additions and 32 deletions

View File

@@ -1,6 +1,7 @@
--- Component to block input on specify zone (node)
-- @module druid.blocker
local Event = require("druid.event")
local const = require("druid.const")
local helper = require("druid.helper")
local component = require("druid.component")
@@ -10,6 +11,9 @@ local M = component.create("blocker", { const.ON_INPUT_HIGH })
function M.init(self, node)
self.node = self:get_node(node)
self.on_click = Event()
self.on_enable_change = Event()
end
@@ -30,4 +34,14 @@ function M.on_input(self, action_id, action)
end
function M.set_enabled(self, state)
end
function M.is_enabled(self, state)
end
return M