From a6c47ce61a289f5261609b452099ea32f3482eac Mon Sep 17 00:00:00 2001 From: Robert Jelic <36573031+NoryiE@users.noreply.github.com> Date: Thu, 15 Sep 2022 20:07:31 +0200 Subject: [PATCH] border update Final border update (hopefully), now the border is inside the object, which means other objects can be above the border --- Basalt/Object.lua | 34 +++++++++++++++++----------------- Basalt/main.lua | 2 +- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/Basalt/Object.lua b/Basalt/Object.lua index 35b0de1..ceffb6b 100644 --- a/Basalt/Object.lua +++ b/Basalt/Object.lua @@ -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 diff --git a/Basalt/main.lua b/Basalt/main.lua index fc54eaa..58bb961 100644 --- a/Basalt/main.lua +++ b/Basalt/main.lua @@ -297,7 +297,7 @@ basalt = { setMouseDragThrottle = function(amount) if(amount<50)then - dragThrottle = 5 + dragThrottle = 50 else dragThrottle = amount end