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

@@ -149,9 +149,9 @@ class PokemonEntryScene
pbSetSystemFont(@sprites["gender"].bitmap)
textpos = []
if pokemon.male?
textpos.push([_INTL(""), 0, 6, false, Color.new(0, 128, 248), Color.new(168, 184, 184)])
textpos.push([_INTL(""), 0, 6, :left, Color.new(0, 128, 248), Color.new(168, 184, 184)])
elsif pokemon.female?
textpos.push([_INTL(""), 0, 6, false, Color.new(248, 24, 24), Color.new(168, 184, 184)])
textpos.push([_INTL(""), 0, 6, :left, Color.new(248, 24, 24), Color.new(168, 184, 184)])
end
pbDrawTextPositions(@sprites["gender"].bitmap, textpos)
end
@@ -383,7 +383,7 @@ class PokemonEntryScene2
COLUMNS.times do |y|
ROWS.times do |x|
pos = (y * ROWS) + x
textPos.push([@@Characters[i][0][pos], 44 + (x * 32), 24 + (y * 38), 2,
textPos.push([@@Characters[i][0][pos], 44 + (x * 32), 24 + (y * 38), :center,
Color.new(16, 24, 32), Color.new(160, 160, 160)])
end
end
@@ -430,9 +430,9 @@ class PokemonEntryScene2
pbSetSystemFont(@sprites["gender"].bitmap)
textpos = []
if pokemon.male?
textpos.push([_INTL(""), 0, 6, false, Color.new(0, 128, 248), Color.new(168, 184, 184)])
textpos.push([_INTL(""), 0, 6, :left, Color.new(0, 128, 248), Color.new(168, 184, 184)])
elsif pokemon.female?
textpos.push([_INTL(""), 0, 6, false, Color.new(248, 24, 24), Color.new(168, 184, 184)])
textpos.push([_INTL(""), 0, 6, :left, Color.new(248, 24, 24), Color.new(168, 184, 184)])
end
pbDrawTextPositions(@sprites["gender"].bitmap, textpos)
end
@@ -507,12 +507,12 @@ class PokemonEntryScene2
bgoverlay.clear
pbSetSystemFont(bgoverlay)
textPositions = [
[@helptext, 160, 18, false, Color.new(16, 24, 32), Color.new(168, 184, 184)]
[@helptext, 160, 18, :left, Color.new(16, 24, 32), Color.new(168, 184, 184)]
]
chars = @helper.textChars
x = 172
chars.each do |ch|
textPositions.push([ch, x, 54, 2, Color.new(16, 24, 32), Color.new(168, 184, 184)])
textPositions.push([ch, x, 54, :center, Color.new(16, 24, 32), Color.new(168, 184, 184)])
x += 24
end
pbDrawTextPositions(bgoverlay, textPositions)