mirror of
https://github.com/linux-man/LoveFrames.git
synced 2024-11-18 16:04:22 +00:00
Fixed a bug that prevented the text object from being drawn in a list that has no padding
This commit is contained in:
parent
27fd2d3634
commit
03bd3e2cfc
@ -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
|
||||
|
||||
|
@ -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 = {}
|
||||
|
Loading…
Reference in New Issue
Block a user