Fixes quest journal

This commit is contained in:
chardub
2023-01-02 23:28:43 -05:00
parent 950f7ef63c
commit ba678d5b6b
3 changed files with 427 additions and 382 deletions

View File

@@ -1240,3 +1240,37 @@ def pbDrawImagePositions(bitmap,textpos)
srcbitmap.dispose
end
end
#added for quest log script ( edit )
def renderMultiLine(bitmap,xDst,yDst,normtext,maxheight,baseColor,shadowColor)
for i in 0...normtext.length
width=normtext[i][3]
textx=normtext[i][1]+xDst
texty=normtext[i][2]+yDst
if shadowColor
height=normtext[i][4]
text=normtext[i][0]
bitmap.font.color=shadowColor
bitmap.draw_text(textx-2,texty-2,width,height,text,0)
bitmap.draw_text(textx,texty-2,width,height,text,0)
bitmap.draw_text(textx+2,texty-2,width,height,text,0)
bitmap.draw_text(textx-2,texty,width,height,text,0)
bitmap.draw_text(textx+2,texty,width,height,text,0)
bitmap.draw_text(textx-2,texty+2,width,height,text,0)
bitmap.draw_text(textx,texty+2,width,height,text,0)
bitmap.draw_text(textx+2,texty+2,width,height,text,0)
end
if baseColor
height=normtext[i][4]
text=normtext[i][0]
bitmap.font.color=baseColor
bitmap.draw_text(textx,texty,width,height,text,0)
end
end
end
def drawTextExMulti(bitmap,x,y,width,numlines,text,baseColor,shadowColor)
normtext=getLineBrokenChunks(bitmap,text,width,nil,true)
renderMultiLine(bitmap,x,y,normtext,numlines*32,baseColor,shadowColor)
end

File diff suppressed because it is too large Load Diff