mirror of
https://github.com/TangentFoxy/Pop.Box.git
synced 2024-12-15 12:44:20 +00:00
parent
d980e14c1b
commit
61f126cd62
@ -243,6 +243,20 @@ do
|
||||
self.parent:removeChild(self)
|
||||
self = nil
|
||||
return nil
|
||||
end,
|
||||
getVisibility = function(self)
|
||||
return (not self.excludeDraw)
|
||||
end,
|
||||
setVisibility = function(self, isVisible)
|
||||
self.excludeDraw = (not isVisible)
|
||||
return self
|
||||
end,
|
||||
getStatic = function(self)
|
||||
return self.excludeMovement
|
||||
end,
|
||||
setStatic = function(self, isStatic)
|
||||
self.excludeMovement = isStatic
|
||||
return self
|
||||
end
|
||||
}
|
||||
_base_0.__index = _base_0
|
||||
@ -262,6 +276,9 @@ do
|
||||
end
|
||||
self.horizontal = "left"
|
||||
self.vertical = "top"
|
||||
self.excludeDraw = false
|
||||
self.excludeUpdate = false
|
||||
self.excludeMovement = false
|
||||
end,
|
||||
__base = _base_0,
|
||||
__name = "element"
|
||||
|
@ -52,6 +52,26 @@ element.__base.margin = function(self, m)
|
||||
end
|
||||
end
|
||||
element.__base.resize = element.__base.adjustSize
|
||||
element.__base.visibility = function(self, v)
|
||||
if v ~= nil then
|
||||
return self:setVisibility(v)
|
||||
else
|
||||
return self:getVisibility()
|
||||
end
|
||||
end
|
||||
element.__base.show = function(self)
|
||||
return self:setVisibility(true)
|
||||
end
|
||||
element.__base.hide = function(self)
|
||||
return self:setVisibility(false)
|
||||
end
|
||||
element.__base.static = function(self, s)
|
||||
if s ~= nil then
|
||||
return self:setStatic(s)
|
||||
else
|
||||
return self:getStatic()
|
||||
end
|
||||
end
|
||||
box.__base.color = function(self, r, g, b, a)
|
||||
if r or g or b or a then
|
||||
return self:setColor(r, g, b, a)
|
||||
|
@ -243,6 +243,20 @@ do
|
||||
self.parent:removeChild(self)
|
||||
self = nil
|
||||
return nil
|
||||
end,
|
||||
getVisibility = function(self)
|
||||
return (not self.excludeDraw)
|
||||
end,
|
||||
setVisibility = function(self, isVisible)
|
||||
self.excludeDraw = (not isVisible)
|
||||
return self
|
||||
end,
|
||||
getStatic = function(self)
|
||||
return self.excludeMovement
|
||||
end,
|
||||
setStatic = function(self, isStatic)
|
||||
self.excludeMovement = isStatic
|
||||
return self
|
||||
end
|
||||
}
|
||||
_base_0.__index = _base_0
|
||||
@ -262,6 +276,9 @@ do
|
||||
end
|
||||
self.horizontal = "left"
|
||||
self.vertical = "top"
|
||||
self.excludeDraw = false
|
||||
self.excludeUpdate = false
|
||||
self.excludeMovement = false
|
||||
end,
|
||||
__base = _base_0,
|
||||
__name = "element"
|
||||
|
@ -52,6 +52,26 @@ element.__base.margin = function(self, m)
|
||||
end
|
||||
end
|
||||
element.__base.resize = element.__base.adjustSize
|
||||
element.__base.visibility = function(self, v)
|
||||
if v ~= nil then
|
||||
return self:setVisibility(v)
|
||||
else
|
||||
return self:getVisibility()
|
||||
end
|
||||
end
|
||||
element.__base.show = function(self)
|
||||
return self:setVisibility(true)
|
||||
end
|
||||
element.__base.hide = function(self)
|
||||
return self:setVisibility(false)
|
||||
end
|
||||
element.__base.static = function(self, s)
|
||||
if s ~= nil then
|
||||
return self:setStatic(s)
|
||||
else
|
||||
return self:getStatic()
|
||||
end
|
||||
end
|
||||
box.__base.color = function(self, r, g, b, a)
|
||||
if r or g or b or a then
|
||||
return self:setColor(r, g, b, a)
|
||||
|
@ -28,6 +28,10 @@ class element
|
||||
@horizontal = "left"
|
||||
@vertical = "top"
|
||||
|
||||
@excludeDraw = false
|
||||
@excludeUpdate = false
|
||||
@excludeMovement = false
|
||||
|
||||
debugDraw: =>
|
||||
graphics.setLineWidth 0.5
|
||||
graphics.setColor 0, 0, 0, 100
|
||||
@ -267,3 +271,17 @@ class element
|
||||
@parent\removeChild @
|
||||
@ = nil
|
||||
return nil
|
||||
|
||||
getVisibility: =>
|
||||
return (not @excludeDraw)
|
||||
|
||||
setVisibility: (isVisible) =>
|
||||
@excludeDraw = (not isVisible)
|
||||
return @
|
||||
|
||||
getStatic: =>
|
||||
return @excludeMovement
|
||||
|
||||
setStatic: (isStatic) =>
|
||||
@excludeMovement = isStatic
|
||||
return @
|
||||
|
@ -47,6 +47,24 @@ element.__base.margin = (m) =>
|
||||
|
||||
element.__base.resize = element.__base.adjustSize
|
||||
|
||||
element.__base.visibility = (v) =>
|
||||
if v != nil
|
||||
return @setVisibility v
|
||||
else
|
||||
return @getVisibility!
|
||||
|
||||
element.__base.show = =>
|
||||
return @setVisibility true
|
||||
|
||||
element.__base.hide = =>
|
||||
return @setVisibility false
|
||||
|
||||
element.__base.static = (s) =>
|
||||
if s != nil
|
||||
return @setStatic s
|
||||
else
|
||||
return @getStatic!
|
||||
|
||||
-- box.__base.background -- can't be done!
|
||||
|
||||
box.__base.color = (r, g, b, a) =>
|
||||
|
Loading…
Reference in New Issue
Block a user