diff --git a/button.lua b/button.lua index 10f32ff..cc48b26 100644 --- a/button.lua +++ b/button.lua @@ -1,3 +1,5 @@ +-- simple immediate-mode buttons + button_handlers = {} -- draw button and queue up event handlers @@ -9,10 +11,10 @@ function button(name, params) end -- process button event handlers -function propagate_to_button_handlers(x, y, button) +function propagate_to_button_handlers(x, y, mouse_button) for _,ev in ipairs(button_handlers) do if x>ev.x and xev.y and y