This commit is contained in:
Kartik K. Agaram 2022-08-23 09:37:38 -07:00
parent cfdac28e18
commit 490f10c6f8
1 changed files with 3 additions and 1 deletions

View File

@ -14,7 +14,9 @@ end
function propagate_to_button_handlers(x, y, mouse_button)
for _,ev in ipairs(Button_handlers) do
if x>ev.x and x<ev.x+ev.w and y>ev.y and y<ev.y+ev.h then
if ev.onpress1 and mouse_button == 1 then ev.onpress1() end
if ev.onpress1 and mouse_button == 1 then
ev.onpress1()
end
end
end
end