Small fixes

bigfonts crash fix
flexbox crash fix when using setJustifyContent
This commit is contained in:
Robert Jelic
2023-06-17 16:31:00 +02:00
parent cc43817f34
commit 63f88f8184
2 changed files with 6 additions and 4 deletions

View File

@@ -30,7 +30,7 @@ return function(name, basalt)
end
end
end
if(typ=="table")then
if(type(typ)=="table")then
for _,v in pairs(typ)do
if(v==value)then
isValid = true
@@ -63,10 +63,12 @@ return function(name, basalt)
end
if(not isValid)then
local t = type(value)
if(type(typ)=="table")then
typ = table.concat(typ, ", ")
t = value
end
error(self:getType()..": Invalid type for property "..name.."! Expected "..typ..", got "..type(value))
error(self:getType()..": Invalid type for property "..name.."! Expected "..typ..", got "..t)
end
return value
end

View File

@@ -207,8 +207,8 @@ return {
oby = oby or math.floor((oY - cY) / 2) + 1
for i = 1, cY do
self:addFG(1, i, bigfont[2][i])
self:addBG(1, i, bigfont[3][i])
self:addFg(1, i, bigfont[2][i])
self:addBg(1, i, bigfont[3][i])
self:addText(1, i, bigfont[1][i])
end
end