summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid McMackins II <contact@mcmackins.org>2018-01-01 14:20:08 -0600
committerDavid McMackins II <contact@mcmackins.org>2018-01-01 14:20:08 -0600
commit9c5344dc12468a9201f2fff7dc17232db5fe9985 (patch)
tree3065f978ffea212b3a6fe2b4851c377c5f9209e0
parentcfa7c83b04b118252e7b1dde1aabdb73b97bcd9d (diff)
Make sure all components get mouse release signal
-rw-r--r--gui.lua6
1 files 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)