Fix
Small term size fix
This commit is contained in:
@@ -327,10 +327,13 @@ wrapRichText = wrapRichText,
|
||||
--- @param height number Height
|
||||
writeWrappedText = function(obj, x, y, text, width, height)
|
||||
local wrapped = wrapRichText(text, width)
|
||||
for _,v in pairs(wrapped)do
|
||||
for k,v in pairs(wrapped)do
|
||||
if(v.y>height)then
|
||||
break
|
||||
end
|
||||
if(k==#wrapped)and(v=="")then
|
||||
break
|
||||
end
|
||||
if(v.text~=nil)then
|
||||
obj:addText(x+v.x-1, y+v.y-1, v.text)
|
||||
end
|
||||
|
||||
@@ -24,6 +24,7 @@ return function(name, basalt)
|
||||
basaltDraw = nil
|
||||
if(value~=nil)then
|
||||
basaltDraw = drawSystem(value)
|
||||
base:setSize(value.getSize())
|
||||
end
|
||||
end)
|
||||
base:setSize(termObject.getSize())
|
||||
@@ -160,6 +161,7 @@ return function(name, basalt)
|
||||
object[v] = function(self, x, y, width, height, symbol)
|
||||
local obx, oby = self:getPosition()
|
||||
local w, h = self:getSize()
|
||||
if(height==nil)then return end
|
||||
height = (y < 1 and (height + y > self:getHeight() and self:getHeight() or height + y - 1) or (height + y > self:getHeight() and self:getHeight() - y + 1 or height))
|
||||
width = (x < 1 and (width + x > self:getWidth() and self:getWidth() or width + x - 1) or (width + x > self:getWidth() and self:getWidth() - x + 1 or width))
|
||||
basaltDraw[v](max(x + (obx - 1), obx), max(y + (oby - 1), oby), width, height, symbol)
|
||||
|
||||
@@ -378,4 +378,4 @@ return function(name, basalt)
|
||||
|
||||
object.__index = object
|
||||
return setmetatable(object, base)
|
||||
end
|
||||
end
|
||||
@@ -1,5 +1,3 @@
|
||||
local XMLParser = require("xmlParser")
|
||||
|
||||
return {
|
||||
VisualObject = function(base)
|
||||
local shadow = false
|
||||
|
||||
Reference in New Issue
Block a user