Fixed up text positioning and window sizes, fixed crash when choosing how many items to toss from the Bag

This commit is contained in:
Maruno17
2021-03-07 23:08:05 +00:00
parent 3ca08f27b8
commit 4c35a7ecfe
31 changed files with 342 additions and 438 deletions

View File

@@ -422,7 +422,6 @@ _drawFormattedChars_ function.
def getFormattedText(bitmap,xDst,yDst,widthDst,heightDst,text,lineheight=32,
newlineBreaks=true,explicitBreaksOnly=false,
collapseAlignments=false)
yDst += 4
dummybitmap=nil
if !bitmap || bitmap.disposed? # allows function to be called with nil bitmap
dummybitmap=Bitmap.new(1,1)
@@ -1090,7 +1089,7 @@ def pbDrawShadowText(bitmap,x,y,width,height,string,baseColor,shadowColor=nil,al
return if !bitmap || !string
width=(width<0) ? bitmap.text_size(string).width+1 : width
height=(height<0) ? bitmap.text_size(string).height+1 : height
y += -2
y += 4
if shadowColor && shadowColor.alpha>0
bitmap.font.color=shadowColor
bitmap.draw_text(x+2,y,width,height,string,align)