From 6e152a9f3fc8dcae132874e9ea967bbf211fc5aa Mon Sep 17 00:00:00 2001 From: "Kartik K. Agaram" Date: Tue, 17 May 2022 23:18:56 -0700 Subject: [PATCH] . --- button.lua | 6 ++++-- main.lua | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) 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