def pbDrawTextPositions now uses symbols for text alignment and outline, and added a quicker way to draw text with no shadow/outline

This commit is contained in:
Maruno17
2023-04-04 21:16:09 +01:00
parent e7847fba9a
commit cb4a1fd8af
27 changed files with 295 additions and 279 deletions

View File

@@ -66,7 +66,7 @@ class Window_PokemonBag < Window_DrawableCommand
rect = Rect.new(rect.x + 16, rect.y + 16, rect.width - 16, rect.height)
thispocket = @bag.pockets[@pocket]
if index == self.itemCount - 1
textpos.push([_INTL("CLOSE BAG"), rect.x, rect.y + 2, false, self.baseColor, self.shadowColor])
textpos.push([_INTL("CLOSE BAG"), rect.x, rect.y + 2, :left, self.baseColor, self.shadowColor])
else
item = (@filterlist) ? thispocket[@filterlist[@pocket][index]][0] : thispocket[index][0]
baseColor = self.baseColor
@@ -76,7 +76,7 @@ class Window_PokemonBag < Window_DrawableCommand
shadowColor = Color.new(248, 144, 144)
end
textpos.push(
[@adapter.getDisplayName(item), rect.x, rect.y + 2, false, baseColor, shadowColor]
[@adapter.getDisplayName(item), rect.x, rect.y + 2, :left, baseColor, shadowColor]
)
if GameData::Item.get(item).is_important?
if @bag.registered?(item)
@@ -94,7 +94,7 @@ class Window_PokemonBag < Window_DrawableCommand
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, rect.y + 2, false, baseColor, shadowColor])
textpos.push([qtytext, xQty, rect.y + 2, :left, baseColor, shadowColor])
end
end
pbDrawTextPositions(self.contents, textpos)
@@ -293,7 +293,7 @@ class PokemonBag_Scene
# Draw the pocket name
pbDrawTextPositions(
overlay,
[[PokemonBag.pocket_names[@bag.last_viewed_pocket - 1], 94, 186, 2, POCKETNAMEBASECOLOR, POCKETNAMESHADOWCOLOR]]
[[PokemonBag.pocket_names[@bag.last_viewed_pocket - 1], 94, 186, :center, POCKETNAMEBASECOLOR, POCKETNAMESHADOWCOLOR]]
)
# Draw slider arrows
showslider = false