mirror of
https://github.com/linux-man/LoveFrames.git
synced 2024-11-18 16:04:22 +00:00
Merge pull request #118 from amPerl/master
Added frame close event cancelling
This commit is contained in:
commit
4dfffef2bc
@ -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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user