Fix metatable inheritance rules
This commit is contained in:
parent
b70c3451fa
commit
c056eae22f
@ -18,6 +18,7 @@ local Element = {
|
|||||||
id = "",
|
id = "",
|
||||||
onClick = nil
|
onClick = nil
|
||||||
}
|
}
|
||||||
|
Element.__index = Element
|
||||||
|
|
||||||
local function createWindow(element)
|
local function createWindow(element)
|
||||||
return window.create(element.render.parent, element:getX(), element:getY(), element:getWidth(), element:getHeight(), element:isVisible())
|
return window.create(element.render.parent, element:getX(), element:getY(), element:getWidth(), element:getHeight(), element:isVisible())
|
||||||
@ -28,7 +29,7 @@ function Element:new(o)
|
|||||||
local obj = o or {}
|
local obj = o or {}
|
||||||
|
|
||||||
setmetatable(obj, self)
|
setmetatable(obj, self)
|
||||||
obj.__index = self
|
obj.__index = obj
|
||||||
|
|
||||||
if obj.render and obj.render.parent then
|
if obj.render and obj.render.parent then
|
||||||
obj:_reload()
|
obj:_reload()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user