From 9c5344dc12468a9201f2fff7dc17232db5fe9985 Mon Sep 17 00:00:00 2001 From: David McMackins II Date: Mon, 1 Jan 2018 14:20:08 -0600 Subject: Make sure all components get mouse release signal --- gui.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gui.lua b/gui.lua index 7ad7097..9f73101 100644 --- a/gui.lua +++ b/gui.lua @@ -63,13 +63,15 @@ function Gui:mousepressed(x, y, button) end function Gui:mousereleased(x, y, button) + local ret = false + for _,component in ipairs(self._components) do if component:mousereleased(x, y, button) then - return true + ret = true end end - return false + return ret end function Gui:textinput(c) -- cgit v1.2.3