mirror of
https://github.com/Insality/druid
synced 2025-06-27 10:27:48 +02:00
input check from later node first
This commit is contained in:
parent
8be103111b
commit
a56c691e86
@ -109,7 +109,7 @@ function _factory.on_input(factory, action_id, action)
|
||||
if factory[data.ON_SWIPE] then
|
||||
local v, result
|
||||
local len = #factory[data.ON_SWIPE]
|
||||
for i = 1, len do
|
||||
for i = len, 1, -1 do
|
||||
v = factory[data.ON_SWIPE][i]
|
||||
result = result or v:on_input(action_id, action)
|
||||
end
|
||||
@ -120,7 +120,7 @@ function _factory.on_input(factory, action_id, action)
|
||||
if factory[data.ON_INPUT] then
|
||||
local v
|
||||
local len = #factory[data.ON_INPUT]
|
||||
for i = 1, len do
|
||||
for i = len, 1, -1 do
|
||||
v = factory[data.ON_INPUT][i]
|
||||
if action_id == v.event and v:on_input(action_id, action) then
|
||||
return true
|
||||
|
Loading…
x
Reference in New Issue
Block a user