Fixed a bug that prevented the text object from being drawn in a list that has no padding

This commit is contained in:
Kenny Shields 2012-05-06 20:15:07 -04:00
parent 27fd2d3634
commit 03bd3e2cfc
2 changed files with 8 additions and 8 deletions

View File

@ -335,16 +335,16 @@ function list:RedoLayout()
if vbar == true then
if v.width + padding > (self.width - self.internals[1].width) then
v:SetWidth((self.width - self.internals[1].width) - padding*2)
v:SetWidth((self.width - self.internals[1].width) - (padding*2))
end
if v.retainsize == false then
v:SetWidth((self.width - self.internals[1].width) - padding*2)
v:SetWidth((self.width - self.internals[1].width) - (padding*2))
end
self.internals[1].staticx = self.width - self.internals[1].width
self.internals[1].height = self.height
else
if v.retainsize == false then
v:SetWidth(self.width - padding*2)
v:SetWidth(self.width - (padding*2))
end
end
@ -358,16 +358,16 @@ function list:RedoLayout()
if hbar == true then
if v.height + padding > (self.height - self.internals[1].height) then
v:SetHeight((self.height - self.internals[1].height) - padding*2)
v:SetHeight((self.height - self.internals[1].height) - (padding*2))
end
if v.retainsize == false then
v:SetHeight((self.height - self.internals[1].height) - padding*2)
v:SetHeight((self.height - self.internals[1].height) - (padding*2))
end
self.internals[1].staticy = self.height - self.internals[1].height
self.internals[1].width = self.width
else
if v.retainsize == false then
v:SetHeight(self.height - padding*2)
v:SetHeight(self.height - (padding*2))
end
end

View File

@ -20,8 +20,8 @@ function text:initialize()
self.type = "text"
self.text = ""
self.font = love.graphics.newFont(12)
self.width = 0
self.height = 0
self.width = 5
self.height = 5
self.maxw = 0
self.lines = 1
self.text = {}