mirror of
https://github.com/infinitefusion/infinitefusion-e18.git
synced 2025-12-09 14:14:59 +00:00
Fixed up text positioning and window sizes, fixed crash when choosing how many items to toss from the Bag
This commit is contained in:
@@ -64,10 +64,9 @@ class Window_PokemonBag < Window_DrawableCommand
|
||||
def drawItem(index,_count,rect)
|
||||
textpos = []
|
||||
rect = Rect.new(rect.x+16,rect.y+16,rect.width-16,rect.height)
|
||||
ypos = rect.y+4
|
||||
thispocket = @bag.pockets[@pocket]
|
||||
if index==self.itemCount-1
|
||||
textpos.push([_INTL("CLOSE BAG"),rect.x,ypos,false,self.baseColor,self.shadowColor])
|
||||
textpos.push([_INTL("CLOSE BAG"),rect.x,rect.y-2,false,self.baseColor,self.shadowColor])
|
||||
else
|
||||
item = (@filterlist) ? thispocket[@filterlist[@pocket][index]][0] : thispocket[index][0]
|
||||
baseColor = self.baseColor
|
||||
@@ -77,23 +76,23 @@ class Window_PokemonBag < Window_DrawableCommand
|
||||
shadowColor = Color.new(248,144,144)
|
||||
end
|
||||
textpos.push(
|
||||
[@adapter.getDisplayName(item),rect.x,ypos,false,baseColor,shadowColor]
|
||||
[@adapter.getDisplayName(item),rect.x,rect.y-2,false,baseColor,shadowColor]
|
||||
)
|
||||
if GameData::Item.get(item).is_important?
|
||||
if @bag.pbIsRegistered?(item)
|
||||
pbDrawImagePositions(self.contents,[
|
||||
["Graphics/Pictures/Bag/icon_register",rect.x+rect.width-72,ypos+4,0,0,-1,24]
|
||||
["Graphics/Pictures/Bag/icon_register",rect.x+rect.width-72,rect.y+8,0,0,-1,24]
|
||||
])
|
||||
elsif pbCanRegisterItem?(item)
|
||||
pbDrawImagePositions(self.contents,[
|
||||
["Graphics/Pictures/Bag/icon_register",rect.x+rect.width-72,ypos+4,0,24,-1,24]
|
||||
["Graphics/Pictures/Bag/icon_register",rect.x+rect.width-72,rect.y+8,0,24,-1,24]
|
||||
])
|
||||
end
|
||||
else
|
||||
qty = (@filterlist) ? thispocket[@filterlist[@pocket][index]][1] : thispocket[index][1]
|
||||
qtytext = _ISPRINTF("x{1: 3d}",qty)
|
||||
xQty = rect.x+rect.width-self.contents.text_size(qtytext).width-16
|
||||
textpos.push([qtytext,xQty,ypos,false,baseColor,shadowColor])
|
||||
textpos.push([qtytext,xQty,rect.y-2,false,baseColor,shadowColor])
|
||||
end
|
||||
end
|
||||
pbDrawTextPositions(self.contents,textpos)
|
||||
@@ -282,7 +281,7 @@ class PokemonBag_Scene
|
||||
overlay.clear
|
||||
# Draw the pocket name
|
||||
pbDrawTextPositions(overlay,[
|
||||
[PokemonBag.pocketNames[@bag.lastpocket],94,180,2,POCKETNAMEBASECOLOR,POCKETNAMESHADOWCOLOR]
|
||||
[PokemonBag.pocketNames[@bag.lastpocket],94,176,2,POCKETNAMEBASECOLOR,POCKETNAMESHADOWCOLOR]
|
||||
])
|
||||
# Draw slider arrows
|
||||
showslider = false
|
||||
|
||||
Reference in New Issue
Block a user