getProperty() and setProperty() #80

Merged
thesabinelim merged 22 commits from get-set-property into master 2023-05-16 01:24:16 +08:00
Showing only changes of commit e068c3f09c - Show all commits

View File

@@ -138,10 +138,18 @@ return function(name, basalt)
return x
end,
setX = function(self, newX)
return self:setPosition(newX, y)
end,
getY = function(self)
return y
end,
setY = function(self, newY)
return self:setPosition(x, newY)
end,
getPosition = function(self)
return x, y
end,
@@ -167,10 +175,18 @@ return function(name, basalt)
return height
end,
setHeight = function(self, newHeight)
return self:setSize(width, newHeight)
end,
getWidth = function(self)
return width
end,
setWidth = function(self, newWidth)
return self:setSize(newWidth, height)
end,
getSize = function(self)
return width, height
end,