border update

Final border update (hopefully), now the border is inside the object, which means other objects can be above the border
This commit is contained in:
Robert Jelic
2022-09-15 20:07:31 +02:00
parent 96bc472b0d
commit a6c47ce61a
2 changed files with 18 additions and 18 deletions

View File

@@ -423,31 +423,31 @@ return function(name)
local bgCol = self.bgColor
if(borderColors["left"]~=false)then
self.parent:drawTextBox(x-1, y, 1, h, "\149")
if(bgCol~=false)then self.parent:drawBackgroundBox(x-1, y, 1, h, self.bgColor) end
self.parent:drawForegroundBox(x-1, y, 1, h, borderColors["left"])
end
if(borderColors["left"]~=false)and(borderColors["top"]~=false)then
self.parent:drawTextBox(x-1, y-1, 1, 1, "\151")
if(bgCol~=false)then self.parent:drawBackgroundBox(x-1, y-1, 1, 1, self.bgColor) end
self.parent:drawForegroundBox(x-1, y-1, 1, 1, borderColors["left"])
self.parent:drawTextBox(x, y, 1, h, "\149")
if(bgCol~=false)then self.parent:drawBackgroundBox(x, y, 1, h, self.bgColor) end
self.parent:drawForegroundBox(x, y, 1, h, borderColors["left"])
end
if(borderColors["top"]~=false)then
self.parent:drawTextBox(x, y-1, w, 1, "\131")
if(bgCol~=false)then self.parent:drawBackgroundBox(x, y-1, w, 1, self.bgColor) end
self.parent:drawForegroundBox(x, y-1, w, 1, borderColors["top"])
self.parent:drawTextBox(x, y, w, 1, "\131")
if(bgCol~=false)then self.parent:drawBackgroundBox(x, y, w, 1, self.bgColor) end
self.parent:drawForegroundBox(x, y, w, 1, borderColors["top"])
end
if(borderColors["top"]~=false)and(borderColors["right"]~=false)then
self.parent:drawTextBox(x+w, y-1, 1, 1, "\148")
if(bgCol~=false)then self.parent:drawForegroundBox(x+w, y-1, 1, 1, self.bgColor) end
self.parent:drawBackgroundBox(x+w, y-1, 1, 1, borderColors["right"])
if(borderColors["left"]~=false)and(borderColors["top"]~=false)then
self.parent:drawTextBox(x, y, 1, 1, "\151")
if(bgCol~=false)then self.parent:drawBackgroundBox(x, y, 1, 1, self.bgColor) end
self.parent:drawForegroundBox(x, y, 1, 1, borderColors["left"])
end
if(borderColors["right"]~=false)then
self.parent:drawTextBox(x+w, y, 1, h, "\149")
if(bgCol~=false)then self.parent:drawForegroundBox(x+w, y, 1, h, self.bgColor) end
self.parent:drawBackgroundBox(x+w, y, 1, h, borderColors["right"])
end
if(borderColors["top"]~=false)and(borderColors["right"]~=false)then
self.parent:drawTextBox(x+w, y, 1, 1, "\148")
if(bgCol~=false)then self.parent:drawForegroundBox(x+w, y, 1, 1, self.bgColor) end
self.parent:drawBackgroundBox(x+w, y, 1, 1, borderColors["right"])
end
if(borderColors["right"]~=false)and(borderColors["bottom"]~=false)then
self.parent:drawTextBox(x+w, y+h, 1, 1, "\133")
if(bgCol~=false)then self.parent:drawForegroundBox(x+w, y+h, 1, 1, self.bgColor) end
@@ -459,9 +459,9 @@ return function(name)
self.parent:drawBackgroundBox(x, y+h, w, 1, borderColors["bottom"])
end
if(borderColors["bottom"]~=false)and(borderColors["left"]~=false)then
self.parent:drawTextBox(x-1, y+h, 1, 1, "\138")
self.parent:drawTextBox(x, y+h, 1, 1, "\138")
if(bgCol~=false)then self.parent:drawForegroundBox(x-1, y+h, 1, 1, self.bgColor) end
self.parent:drawBackgroundBox(x-1, y+h, 1, 1, borderColors["left"])
self.parent:drawBackgroundBox(x, y+h, 1, 1, borderColors["left"])
end
end
draw = false

View File

@@ -297,7 +297,7 @@ basalt = {
setMouseDragThrottle = function(amount)
if(amount<50)then
dragThrottle = 5
dragThrottle = 50
else
dragThrottle = amount
end