mirror of
https://github.com/Insality/druid.git
synced 2025-09-27 18:12:19 +02:00
Add druid events in components
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user