This commit is contained in:
Nikita Kruglickiy
2020-12-27 21:29:46 +06:00
parent 1a0785862d
commit eaf0a90173
13 changed files with 116 additions and 86 deletions

View File

@@ -1,8 +1,6 @@
--@include ../utils.txt
--@include ../skins/default.txt
--@include /koptilnya/libs/utils.txt
require("../utils.txt")
local defaultSkin = require("../skins/default.txt")
require("/koptilnya/libs/utils.txt")
Element = class("Element")
@@ -20,7 +18,6 @@ function Element:initialize()
self._firstChild = nil
self._prevSibling = nil
self._nextSibling = nil
self._skin = defaultSkin
end
function Element:setWidth(width)
@@ -128,7 +125,6 @@ function Element:addChild(child)
checkVarClass(child, Element)
child:setParent(self)
child:_setSkin(self._skin)
if not self._firstChild then
self._firstChild = child
@@ -187,10 +183,6 @@ end
-- PROTECTED
function Element:_setSkin(skin)
self._skin = skin
end
function Element:_postEvent(eventKey, ...)
if eventKey == "THINK" then
return self:_onThink()