improve panel/on_clicked

This commit is contained in:
ruki
2020-11-21 00:37:16 +08:00
parent 14fb32a16c
commit dac24fad54

View File

@@ -65,11 +65,10 @@ function panel:init(name, bounds)
local p = v:last()
while p do
if p:option('selectable') and p:bounds():contains(x, y) then
v:select(p)
if p:option("mouseable") then
p:action_on(action.ac_on_clicked, x, y)
v:select(p)
return p:action_on(action.ac_on_clicked, x, y)
end
return true
end
p = v:prev(p)
end