summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorAki <nthirtyone@gmail.com>2017-09-05 02:03:12 +0200
committerAki <nthirtyone@gmail.com>2017-09-05 02:03:12 +0200
commit0406d5d9617d20b528d2c5135a2474c19e23e9fa (patch)
tree5b84e91ae76cbb93758df4903a89ba6090ee9fa3
parenta866dc8e7d1ec941b96acb7dd12c1636cc3f1a80 (diff)
downloadroflnauts-0406d5d9617d20b528d2c5135a2474c19e23e9fa.zip
roflnauts-0406d5d9617d20b528d2c5135a2474c19e23e9fa.tar.gz
roflnauts-0406d5d9617d20b528d2c5135a2474c19e23e9fa.tar.bz2
Fixed typo in Group
-rw-r--r--not/Group.lua8
1 files changed, 4 insertions, 4 deletions
diff --git a/not/Group.lua b/not/Group.lua
index 898d7f3..970d3bc 100644
--- a/not/Group.lua
+++ b/not/Group.lua
@@ -4,7 +4,7 @@ Group = require "not.Element":extends()
function Group:new (parent)
Group.__super.new(self, parent)
self.children = {}
- self.marign = 0
+ self.margin = 0
end
function Group:addChild (element)
@@ -17,17 +17,17 @@ function Group:setPosition (x, y)
local dx = 0
for _,child in ipairs(self.children) do
child:setPosition(x + dx, y)
- dx = dx + child:getSize() + self.marigin
+ dx = dx + child:getSize() + self.margin
end
return Group.__super.setPosition(self, x, y)
end
function Group:getSize ()
- local twidth = -self.marigin
+ local twidth = -self.margin
local theight = 0
for _,child in ipairs(self.children) do
local cwidth, cheight = child:getSize()
- twidth = twidth + child:getSize() + self.marigin
+ twidth = twidth + child:getSize() + self.margin
if theight < cheight then
theight = cheight
end