Merge pull request #118 from amPerl/master

Added frame close event cancelling
This commit is contained in:
Kenny Shields 2014-04-14 18:30:06 -04:00
commit 4dfffef2bc

View File

@ -71,9 +71,14 @@ function newobject:initialize()
close.parent = self
close.OnClick = function(x, y, object)
local onclose = object.parent.OnClose
object.parent:Remove()
if onclose then
onclose(object.parent)
local ret = onclose(object.parent)
if ret ~= false then
object.parent:Remove()
end
else
object.parent:Remove()
end
end