fix a typo
This commit is contained in:
parent
eef22f4242
commit
07e2b7b897
|
@ -9,7 +9,7 @@ function button(name, params)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- process button event handlers
|
-- process button event handlers
|
||||||
function propagate_to_button_handers(x, y, button)
|
function propagate_to_button_handlers(x, y, button)
|
||||||
for _,ev in ipairs(button_handlers) do
|
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 x>ev.x and x<ev.x+ev.w and y>ev.y and y<ev.y+ev.h then
|
||||||
if ev.onpress1 and button == 1 then ev.onpress1() end
|
if ev.onpress1 and button == 1 then ev.onpress1() end
|
||||||
|
|
2
main.lua
2
main.lua
|
@ -92,7 +92,7 @@ function love.update(dt)
|
||||||
end
|
end
|
||||||
|
|
||||||
function love.mousepressed(x,y, button)
|
function love.mousepressed(x,y, button)
|
||||||
propagate_to_button_handers(x,y, button)
|
propagate_to_button_handlers(x,y, button)
|
||||||
propagate_to_drawings(x,y, button)
|
propagate_to_drawings(x,y, button)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue