mirror of
https://github.com/Insality/druid.git
synced 2025-06-27 10:27:47 +02:00
all actions now passed to components
This commit is contained in:
parent
0d98e435b6
commit
10d84670b9
@ -20,7 +20,6 @@ local function register_basic_components()
|
|||||||
M.register(k, v)
|
M.register(k, v)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
register_basic_components()
|
|
||||||
|
|
||||||
|
|
||||||
function M.register(name, module)
|
function M.register(name, module)
|
||||||
@ -70,7 +69,7 @@ function M.on_input(factory, action_id, action)
|
|||||||
local len = #factory[data.ON_INPUT]
|
local len = #factory[data.ON_INPUT]
|
||||||
for i = 1, len do
|
for i = 1, len do
|
||||||
v = factory[data.ON_INPUT][i]
|
v = factory[data.ON_INPUT][i]
|
||||||
if action_id == v.event and action[v.action] and v:on_input(action_id, action) then
|
if action_id == v.event and v:on_input(action_id, action) then
|
||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -156,5 +155,5 @@ function M.play_sound(name)
|
|||||||
-- override to play sound with name
|
-- override to play sound with name
|
||||||
end
|
end
|
||||||
|
|
||||||
|
register_basic_components()
|
||||||
return M
|
return M
|
Loading…
x
Reference in New Issue
Block a user