mirror of
https://github.com/TangentFoxy/Pop.Box.git
synced 2024-12-15 12:44:20 +00:00
deleting elements!
This commit is contained in:
parent
51bb8f581a
commit
a541640cfe
@ -235,6 +235,12 @@ do
|
|||||||
self.y = self.parent.y + self.margin
|
self.y = self.parent.y + self.margin
|
||||||
self.w = self.parent.w - self.margin * 2
|
self.w = self.parent.w - self.margin * 2
|
||||||
self.h = self.parent.h - self.margin * 2
|
self.h = self.parent.h - self.margin * 2
|
||||||
|
end,
|
||||||
|
delete = function(self)
|
||||||
|
for k, v in ipairs(self.child) do
|
||||||
|
v:delete()
|
||||||
|
end
|
||||||
|
return self.parent:removeChild(self)
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
_base_0.__index = _base_0
|
_base_0.__index = _base_0
|
||||||
|
@ -235,6 +235,12 @@ do
|
|||||||
self.y = self.parent.y + self.margin
|
self.y = self.parent.y + self.margin
|
||||||
self.w = self.parent.w - self.margin * 2
|
self.w = self.parent.w - self.margin * 2
|
||||||
self.h = self.parent.h - self.margin * 2
|
self.h = self.parent.h - self.margin * 2
|
||||||
|
end,
|
||||||
|
delete = function(self)
|
||||||
|
for k, v in ipairs(self.child) do
|
||||||
|
v:delete()
|
||||||
|
end
|
||||||
|
return self.parent:removeChild(self)
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
_base_0.__index = _base_0
|
_base_0.__index = _base_0
|
||||||
|
@ -253,3 +253,9 @@ class element
|
|||||||
@y = @parent.y + @margin
|
@y = @parent.y + @margin
|
||||||
@w = @parent.w - @margin*2
|
@w = @parent.w - @margin*2
|
||||||
@h = @parent.h - @margin*2
|
@h = @parent.h - @margin*2
|
||||||
|
|
||||||
|
delete: =>
|
||||||
|
for k,v in ipairs @child
|
||||||
|
v\delete!
|
||||||
|
|
||||||
|
@parent\removeChild @
|
||||||
|
Loading…
Reference in New Issue
Block a user