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