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

@@ -71,16 +71,16 @@ class ReadyMenuButton < Sprite
self.bitmap.blt(0, 0, @button.bitmap, rect)
textx = (@command[2]) ? 164 : (GameData::Item.get(@command[0]).is_important?) ? 146 : 124
textpos = [
[@command[1], textx, 24, 2, Color.new(248, 248, 248), Color.new(40, 40, 40), 1]
[@command[1], textx, 24, :center, Color.new(248, 248, 248), Color.new(40, 40, 40), :outline]
]
if !@command[2] && !GameData::Item.get(@command[0]).is_important?
qty = $bag.quantity(@command[0])
if qty > 99
textpos.push([_INTL(">99"), 230, 24, 1,
Color.new(248, 248, 248), Color.new(40, 40, 40), 1])
textpos.push([_INTL(">99"), 230, 24, :right,
Color.new(248, 248, 248), Color.new(40, 40, 40), :outline])
else
textpos.push([_INTL("x{1}", qty), 230, 24, 1,
Color.new(248, 248, 248), Color.new(40, 40, 40), 1])
textpos.push([_INTL("x{1}", qty), 230, 24, :right,
Color.new(248, 248, 248), Color.new(40, 40, 40), :outline])
end
end
pbDrawTextPositions(self.bitmap, textpos)