diff --git a/pop/elements/element.lua b/pop/elements/element.lua index 3201841..3b0be75 100644 --- a/pop/elements/element.lua +++ b/pop/elements/element.lua @@ -105,7 +105,15 @@ end function element:adjustSize(x, y) local X, Y = self:getSize() - self:setSize(X + x, Y + y) + + if x then + X = X + x + end + if y then + Y = Y + y + end + + self:setSize(X, Y) return self end diff --git a/pop/elements/text.lua b/pop/elements/text.lua index f581a49..90c229a 100644 --- a/pop/elements/text.lua +++ b/pop/elements/text.lua @@ -9,7 +9,7 @@ local text = class("pop.text", element) function text:initialize(pop, parent, text, color) element.initialize(self, pop, parent) - self.font = lg.newFont() + self.font = lg.newFont(14) self:setText(text or "") self.color = color or {255, 255, 255, 255} end