Small bugfix
Fixed border bug
This commit is contained in:
@@ -5,8 +5,8 @@ return {
|
|||||||
|
|
||||||
local object = {
|
local object = {
|
||||||
setBorder = function(self, ...)
|
setBorder = function(self, ...)
|
||||||
if(...~=nil)then
|
|
||||||
local t = {...}
|
local t = {...}
|
||||||
|
if(t~=nil)then
|
||||||
for k,v in pairs(t)do
|
for k,v in pairs(t)do
|
||||||
if(v=="left")or(#t==1)then
|
if(v=="left")or(#t==1)then
|
||||||
borderColors["left"] = t[1]
|
borderColors["left"] = t[1]
|
||||||
@@ -29,7 +29,6 @@ return {
|
|||||||
draw = function(self)
|
draw = function(self)
|
||||||
base.draw(self)
|
base.draw(self)
|
||||||
self:addDraw("border", function()
|
self:addDraw("border", function()
|
||||||
if(border~=false)then
|
|
||||||
local x, y = self:getPosition()
|
local x, y = self:getPosition()
|
||||||
local w,h = self:getSize()
|
local w,h = self:getSize()
|
||||||
local bgCol = self:getBackground()
|
local bgCol = self:getBackground()
|
||||||
@@ -39,15 +38,17 @@ return {
|
|||||||
if(bgCol~=false)then self:addBackgroundBox(1, 1, 1, h, bgCol) end
|
if(bgCol~=false)then self:addBackgroundBox(1, 1, 1, h, bgCol) end
|
||||||
self:addForegroundBox(1, 1, 1, h, borderColors["left"])
|
self:addForegroundBox(1, 1, 1, h, borderColors["left"])
|
||||||
end
|
end
|
||||||
|
|
||||||
if(borderColors["top"]~=false)then
|
if(borderColors["top"]~=false)then
|
||||||
self:addTextBox(1, 1, w, 1, "\131")
|
self:addTextBox(1, 1, w, 1, "\131")
|
||||||
if(bgCol~=false)then self:addBackgroundBox(1, 1, w, 1, bgCol) end
|
if(bgCol~=false)then self:addBackgroundBox(1, 1, w, 1, bgCol) end
|
||||||
self:addForegroundBox(1, 1, w, 1, borderColors["top"])
|
self:addForegroundBox(1, 1, w, 1, borderColors["top"])
|
||||||
end
|
end
|
||||||
|
|
||||||
if(borderColors["left"]~=false)and(borderColors["top"]~=false)then
|
if(borderColors["left"]~=false)and(borderColors["top"]~=false)then
|
||||||
self:addTextBox(1, 1, 1, 1, "\151")
|
self:addTextBox(1, 1, 1, 1, "\151")
|
||||||
if(bgCol~=false)then self:addBackgroundBox(1, 1, 1, 1, bgCol) end
|
if(bgCol~=false)then self:addBackgroundBox(1, 1, 1, 1, bgCol) end
|
||||||
self:drawForegroundBox(1, 1, 1, 1, borderColors["left"])
|
self:addForegroundBox(1, 1, 1, 1, borderColors["left"])
|
||||||
end
|
end
|
||||||
if(borderColors["right"]~=false)then
|
if(borderColors["right"]~=false)then
|
||||||
self:addTextBox(w, 1, 1, h, "\149")
|
self:addTextBox(w, 1, 1, h, "\149")
|
||||||
@@ -75,7 +76,6 @@ return {
|
|||||||
self:addBackgroundBox(1, h, 1, 1, borderColors["left"])
|
self:addBackgroundBox(1, h, 1, 1, borderColors["left"])
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
|
||||||
end)
|
end)
|
||||||
end,
|
end,
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user