Pop.Box/util.lua
Paul Liverman III 6255f30fa6 text element, fixed object creation
- inheritsFromElement improved
- fixed a couple bugs in element
- added inspect library
2017-01-10 12:57:02 -08:00

20 lines
429 B
Lua

local inheritsFromElement
inheritsFromElement = function(object)
if object and type(object) == "table" and object.__class then
local cls = object.__class
if cls.__name == "element" then
return true
end
while cls.__parent do
cls = cls.__parent
if cls.__name == "element" then
return true
end
end
end
return false
end
return {
inheritsFromElement = inheritsFromElement
}