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

@@ -17,15 +17,15 @@ class Window_DexesList < Window_CommandPokemon
def drawItem(index,count,rect)
super(index,count,rect)
if index>=0 && index<@commands2.length
pbDrawShadowText(self.contents,rect.x+254,rect.y + 6,64,rect.height,
pbDrawShadowText(self.contents,rect.x+254,rect.y,64,rect.height,
sprintf("%d",@commands2[index][0]),self.baseColor,self.shadowColor,1)
pbDrawShadowText(self.contents,rect.x+350,rect.y + 6,64,rect.height,
pbDrawShadowText(self.contents,rect.x+350,rect.y,64,rect.height,
sprintf("%d",@commands2[index][1]),self.baseColor,self.shadowColor,1)
allseen = (@commands2[index][0]>=@commands2[index][2])
allown = (@commands2[index][1]>=@commands2[index][2])
pbDrawImagePositions(self.contents,[
["Graphics/Pictures/Pokedex/icon_menuseenown",rect.x+236,rect.y+4,(allseen) ? 24 : 0,0,24,24],
["Graphics/Pictures/Pokedex/icon_menuseenown",rect.x+332,rect.y+4,(allown) ? 24 : 0,24,24,24]
["Graphics/Pictures/Pokedex/icon_menuseenown",rect.x+236,rect.y+2,(allseen) ? 24 : 0,0,24,24],
["Graphics/Pictures/Pokedex/icon_menuseenown",rect.x+332,rect.y+2,(allown) ? 24 : 0,24,24,24]
])
end
end

View File

@@ -48,7 +48,7 @@ class Window_Pokedex < Window_DrawableCommand
else
text = sprintf("%03d ----------",indexNumber)
end
pbDrawShadowText(self.contents,rect.x+36,rect.y+6 + 6,rect.width,rect.height,
pbDrawShadowText(self.contents,rect.x+36,rect.y+6,rect.width,rect.height,
text,self.baseColor,self.shadowColor)
end
@@ -392,17 +392,17 @@ class PokemonPokedex_Scene
end
end
textpos = [
[dexname,Graphics.width/2,2,2,Color.new(248,248,248),Color.new(0,0,0)]
[dexname,Graphics.width/2,-2,2,Color.new(248,248,248),Color.new(0,0,0)]
]
textpos.push([GameData::Species.get(iconspecies).name,112,52,2,base,shadow]) if iconspecies
textpos.push([GameData::Species.get(iconspecies).name,112,46,2,base,shadow]) if iconspecies
if @searchResults
textpos.push([_INTL("Search results"),112,308,2,base,shadow])
textpos.push([@dexlist.length.to_s,112,340,2,base,shadow])
textpos.push([_INTL("Search results"),112,302,2,base,shadow])
textpos.push([@dexlist.length.to_s,112,334,2,base,shadow])
else
textpos.push([_INTL("Seen:"),42,308,0,base,shadow])
textpos.push([$Trainer.seen_count(pbGetPokedexRegion).to_s,182,308,1,base,shadow])
textpos.push([_INTL("Owned:"),42,340,0,base,shadow])
textpos.push([$Trainer.owned_count(pbGetPokedexRegion).to_s,182,340,1,base,shadow])
textpos.push([_INTL("Seen:"),42,302,0,base,shadow])
textpos.push([$Trainer.seen_count(pbGetPokedexRegion).to_s,182,302,1,base,shadow])
textpos.push([_INTL("Owned:"),42,334,0,base,shadow])
textpos.push([$Trainer.owned_count(pbGetPokedexRegion).to_s,182,334,1,base,shadow])
end
# Draw all text
pbDrawTextPositions(overlay,textpos)
@@ -445,36 +445,36 @@ class PokemonPokedex_Scene
shadow = Color.new(72,72,72)
# Write various bits of text
textpos = [
[_INTL("Search Mode"),Graphics.width/2,2,2,base,shadow],
[_INTL("Order"),136,58,2,base,shadow],
[_INTL("Name"),58,116,2,base,shadow],
[_INTL("Type"),58,168,2,base,shadow],
[_INTL("Height"),58,220,2,base,shadow],
[_INTL("Weight"),58,272,2,base,shadow],
[_INTL("Color"),326,116,2,base,shadow],
[_INTL("Shape"),454,168,2,base,shadow],
[_INTL("Search Mode"),Graphics.width/2,-2,2,base,shadow],
[_INTL("Order"),136,52,2,base,shadow],
[_INTL("Name"),58,110,2,base,shadow],
[_INTL("Type"),58,162,2,base,shadow],
[_INTL("Height"),58,214,2,base,shadow],
[_INTL("Weight"),58,266,2,base,shadow],
[_INTL("Color"),326,110,2,base,shadow],
[_INTL("Shape"),454,162,2,base,shadow],
[_INTL("Reset"),80,338,2,base,shadow,1],
[_INTL("Start"),Graphics.width/2,338,2,base,shadow,1],
[_INTL("Cancel"),Graphics.width-80,338,2,base,shadow,1]
]
# Write order, name and color parameters
textpos.push([@orderCommands[params[0]],344,60,2,base,shadow,1])
textpos.push([(params[1]<0) ? "----" : @nameCommands[params[1]],176,118,2,base,shadow,1])
textpos.push([(params[8]<0) ? "----" : @colorCommands[params[8]].name,444,118,2,base,shadow,1])
textpos.push([@orderCommands[params[0]],344,58,2,base,shadow,1])
textpos.push([(params[1]<0) ? "----" : @nameCommands[params[1]],176,116,2,base,shadow,1])
textpos.push([(params[8]<0) ? "----" : @colorCommands[params[8]].name,444,116,2,base,shadow,1])
# Draw type icons
if params[2]>=0
type_number = @typeCommands[params[2]].id_number
typerect = Rect.new(0,type_number*32,96,32)
overlay.blt(128,168,@typebitmap.bitmap,typerect)
else
textpos.push(["----",176,170,2,base,shadow,1])
textpos.push(["----",176,168,2,base,shadow,1])
end
if params[3]>=0
type_number = @typeCommands[params[3]].id_number
typerect = Rect.new(0,type_number*32,96,32)
overlay.blt(256,168,@typebitmap.bitmap,typerect)
else
textpos.push(["----",304,170,2,base,shadow,1])
textpos.push(["----",304,168,2,base,shadow,1])
end
# Write height and weight limits
ht1 = (params[4]<0) ? 0 : (params[4]>=@heightCommands.length) ? 999 : @heightCommands[params[4]]
@@ -487,16 +487,16 @@ class PokemonPokedex_Scene
ht2 = (params[5]<0) ? 99*12 : (ht2/0.254).round
wt1 = (params[6]>=@weightCommands.length) ? 99990 : (wt1/0.254).round
wt2 = (params[7]<0) ? 99990 : (wt2/0.254).round
textpos.push([sprintf("%d'%02d''",ht1/12,ht1%12),166,222,2,base,shadow,1])
textpos.push([sprintf("%d'%02d''",ht2/12,ht2%12),294,222,2,base,shadow,1])
textpos.push([sprintf("%.1f",wt1/10.0),166,274,2,base,shadow,1])
textpos.push([sprintf("%.1f",wt2/10.0),294,274,2,base,shadow,1])
textpos.push([sprintf("%d'%02d''",ht1/12,ht1%12),166,220,2,base,shadow,1])
textpos.push([sprintf("%d'%02d''",ht2/12,ht2%12),294,220,2,base,shadow,1])
textpos.push([sprintf("%.1f",wt1/10.0),166,272,2,base,shadow,1])
textpos.push([sprintf("%.1f",wt2/10.0),294,272,2,base,shadow,1])
hwoffset = true
else
textpos.push([sprintf("%.1f",ht1/10.0),166,222,2,base,shadow,1])
textpos.push([sprintf("%.1f",ht2/10.0),294,222,2,base,shadow,1])
textpos.push([sprintf("%.1f",wt1/10.0),166,274,2,base,shadow,1])
textpos.push([sprintf("%.1f",wt2/10.0),294,274,2,base,shadow,1])
textpos.push([sprintf("%.1f",ht1/10.0),166,220,2,base,shadow,1])
textpos.push([sprintf("%.1f",ht2/10.0),294,220,2,base,shadow,1])
textpos.push([sprintf("%.1f",wt1/10.0),166,272,2,base,shadow,1])
textpos.push([sprintf("%.1f",wt2/10.0),294,272,2,base,shadow,1])
end
overlay.blt(344,214,@hwbitmap.bitmap,Rect.new(0,(hwoffset) ? 44 : 0,32,44))
overlay.blt(344,266,@hwbitmap.bitmap,Rect.new(32,(hwoffset) ? 44 : 0,32,44))
@@ -517,13 +517,13 @@ class PokemonPokedex_Scene
shadow = Color.new(72,72,72)
# Write various bits of text
textpos = [
[_INTL("Search Mode"),Graphics.width/2,2,2,base,shadow],
[_INTL("Search Mode"),Graphics.width/2,-2,2,base,shadow],
[_INTL("OK"),80,338,2,base,shadow,1],
[_INTL("Cancel"),Graphics.width-80,338,2,base,shadow,1]
]
title = [_INTL("Order"),_INTL("Name"),_INTL("Type"),_INTL("Height"),
_INTL("Weight"),_INTL("Color"),_INTL("Shape")][mode]
textpos.push([title,102,(mode==6) ? 64 : 58,0,base,shadow])
textpos.push([title,102,(mode==6) ? 58 : 52,0,base,shadow])
case mode
when 0 # Order
xstart = 46; ystart = 128
@@ -627,8 +627,8 @@ class PokemonPokedex_Scene
xpos2 = xstart+(sel[1]+1)*xgap
xpos2 = xstart+cols*xgap if sel[1]<0
xpos2 = xstart if sel[1]>=cols-1
ypos1 = ystart+64-4+112
ypos2 = ystart+32-4
ypos1 = ystart+172
ypos2 = ystart+28
overlay.blt(16,120,@searchsliderbitmap.bitmap,Rect.new(0,192,32,44)) if sel[1]<cols-1
overlay.blt(464,120,@searchsliderbitmap.bitmap,Rect.new(32,192,32,44)) if sel[1]>=0
overlay.blt(16,264,@searchsliderbitmap.bitmap,Rect.new(0,192,32,44)) if sel[0]>=0

View File

@@ -219,24 +219,24 @@ class PokemonPokedexInfo_Scene
end
textpos = [
[_INTL("{1}{2} {3}", indexText, " ", species_data.name),
246, 42, 0, Color.new(248, 248, 248), Color.new(0, 0, 0)],
[_INTL("Height"), 314, 158, 0, base, shadow],
[_INTL("Weight"), 314, 190, 0, base, shadow]
246, 36, 0, Color.new(248, 248, 248), Color.new(0, 0, 0)],
[_INTL("Height"), 314, 152, 0, base, shadow],
[_INTL("Weight"), 314, 184, 0, base, shadow]
]
if $Trainer.owned?(@species)
# Write the category
textpos.push([_INTL("{1} Pokémon", species_data.category), 246, 74, 0, base, shadow])
textpos.push([_INTL("{1} Pokémon", species_data.category), 246, 68, 0, base, shadow])
# Write the height and weight
height = species_data.height
weight = species_data.weight
if System.user_language[3..4] == "US" # If the user is in the United States
inches = (height / 0.254).round
pounds = (weight / 0.45359).round
textpos.push([_ISPRINTF("{1:d}'{2:02d}\"", inches / 12, inches % 12), 460, 158, 1, base, shadow])
textpos.push([_ISPRINTF("{1:4.1f} lbs.", pounds / 10.0), 494, 190, 1, base, shadow])
textpos.push([_ISPRINTF("{1:d}'{2:02d}\"", inches / 12, inches % 12), 460, 152, 1, base, shadow])
textpos.push([_ISPRINTF("{1:4.1f} lbs.", pounds / 10.0), 494, 184, 1, base, shadow])
else
textpos.push([_ISPRINTF("{1:.1f} m", height / 10.0), 470, 158, 1, base, shadow])
textpos.push([_ISPRINTF("{1:.1f} kg", weight / 10.0), 482, 190, 1, base, shadow])
textpos.push([_ISPRINTF("{1:.1f} m", height / 10.0), 470, 152, 1, base, shadow])
textpos.push([_ISPRINTF("{1:.1f} kg", weight / 10.0), 482, 184, 1, base, shadow])
end
# Draw the Pokédex entry text
drawTextEx(overlay, 40, 240, Graphics.width - (40 * 2), 4, # overlay, x, y, width, num lines
@@ -261,14 +261,14 @@ class PokemonPokedexInfo_Scene
overlay.blt(396, 120, @typebitmap.bitmap, type2rect) if type1 != type2
else
# Write the category
textpos.push([_INTL("????? Pokémon"), 246, 74, 0, base, shadow])
textpos.push([_INTL("????? Pokémon"), 246, 68, 0, base, shadow])
# Write the height and weight
if System.user_language[3..4] == "US" # If the user is in the United States
textpos.push([_INTL("???'??\""), 460, 158, 1, base, shadow])
textpos.push([_INTL("????.? lbs."), 494, 190, 1, base, shadow])
textpos.push([_INTL("???'??\""), 460, 152, 1, base, shadow])
textpos.push([_INTL("????.? lbs."), 494, 184, 1, base, shadow])
else
textpos.push([_INTL("????.? m"), 470, 158, 1, base, shadow])
textpos.push([_INTL("????.? kg"), 482, 190, 1, base, shadow])
textpos.push([_INTL("????.? m"), 470, 152, 1, base, shadow])
textpos.push([_INTL("????.? kg"), 482, 184, 1, base, shadow])
end
end
# Draw all text
@@ -354,11 +354,11 @@ class PokemonPokedexInfo_Scene
pbDrawImagePositions(overlay,[
[sprintf("Graphics/Pictures/Pokedex/overlay_areanone"),108,188]
])
textpos.push([_INTL("Area unknown"),Graphics.width/2,Graphics.height/2,2,base,shadow])
textpos.push([_INTL("Area unknown"),Graphics.width/2,Graphics.height/2 - 6,2,base,shadow])
end
textpos.push([pbGetMessage(MessageTypes::RegionNames,@region),414,44,2,base,shadow])
textpos.push([pbGetMessage(MessageTypes::RegionNames,@region),414,38,2,base,shadow])
textpos.push([_INTL("{1}'s area",GameData::Species.get(@species).name),
Graphics.width/2,352,2,base,shadow])
Graphics.width/2,346,2,base,shadow])
pbDrawTextPositions(overlay,textpos)
end
@@ -375,8 +375,8 @@ class PokemonPokedexInfo_Scene
end
end
textpos = [
[GameData::Species.get(@species).name,Graphics.width/2,Graphics.height-88,2,base,shadow],
[formname,Graphics.width/2,Graphics.height-56,2,base,shadow],
[GameData::Species.get(@species).name,Graphics.width/2,Graphics.height-94,2,base,shadow],
[formname,Graphics.width/2,Graphics.height-62,2,base,shadow],
]
# Draw all text
pbDrawTextPositions(overlay,textpos)

View File

@@ -20,7 +20,7 @@ class PokemonPartyConfirmCancelSprite < SpriteWrapper
@overlaysprite.z = self.z+1
pbSetSystemFont(@overlaysprite.bitmap)
@yoffset = 8
textpos = [[text,56,(narrowbox) ? 2 : 8,2,Color.new(248,248,248),Color.new(40,40,40)]]
textpos = [[text,56,(narrowbox) ? -4 : 2,2,Color.new(248,248,248),Color.new(40,40,40)]]
pbDrawTextPositions(@overlaysprite.bitmap,textpos)
self.x = x
self.y = y
@@ -126,7 +126,7 @@ class Window_CommandPokemonColor < Window_CommandPokemon
base = Color.new(0,80,160)
shadow = Color.new(128,192,240)
end
pbDrawShadowText(self.contents,rect.x,rect.y + 6,rect.width,rect.height,
pbDrawShadowText(self.contents,rect.x,rect.y,rect.width,rect.height,
@commands[index],base,shadow)
end
end
@@ -357,11 +357,11 @@ class PokemonPartyPanel < SpriteWrapper
pbSetSystemFont(@overlaysprite.bitmap)
textpos = []
# Draw Pokémon name
textpos.push([@pokemon.name,96,16,0,basecolor,shadowcolor])
textpos.push([@pokemon.name,96,10,0,basecolor,shadowcolor])
if !@pokemon.egg?
if !@text || @text.length==0
# Draw HP numbers
textpos.push([sprintf("% 3d /% 3d",@pokemon.hp,@pokemon.totalhp),224,60,1,basecolor,shadowcolor])
textpos.push([sprintf("% 3d /% 3d",@pokemon.hp,@pokemon.totalhp),224,54,1,basecolor,shadowcolor])
# Draw HP bar
if @pokemon.hp>0
w = @pokemon.hp*96*1.0/@pokemon.totalhp
@@ -390,9 +390,9 @@ class PokemonPartyPanel < SpriteWrapper
end
# Draw gender symbol
if @pokemon.male?
textpos.push([_INTL(""),224,16,0,Color.new(0,112,248),Color.new(120,184,232)])
textpos.push([_INTL(""),224,10,0,Color.new(0,112,248),Color.new(120,184,232)])
elsif @pokemon.female?
textpos.push([_INTL(""),224,16,0,Color.new(232,32,16),Color.new(248,168,184)])
textpos.push([_INTL(""),224,10,0,Color.new(232,32,16),Color.new(248,168,184)])
end
# Draw shiny icon
if @pokemon.shiny?
@@ -407,14 +407,14 @@ class PokemonPartyPanel < SpriteWrapper
"Graphics/Pictures/Party/overlay_lv",20,70,0,0,22,14]])
pbSetSmallFont(@overlaysprite.bitmap)
pbDrawTextPositions(@overlaysprite.bitmap,[
[@pokemon.level.to_s,42,63,0,basecolor,shadowcolor]
[@pokemon.level.to_s,42,57,0,basecolor,shadowcolor]
])
end
# Draw annotation text
if @text && @text.length>0
pbSetSystemFont(@overlaysprite.bitmap)
pbDrawTextPositions(@overlaysprite.bitmap,[
[@text,96,58,0,basecolor,shadowcolor]
[@text,96,52,0,basecolor,shadowcolor]
])
end
end

View File

@@ -338,22 +338,22 @@ class PokemonSummary_Scene
_INTL("MOVES"),
_INTL("RIBBONS")][page-1]
textpos = [
[pagename,26,16,0,base,shadow],
[@pokemon.name,46,62,0,base,shadow],
[@pokemon.level.to_s,46,92,0,Color.new(64,64,64),Color.new(176,176,176)],
[_INTL("Item"),66,318,0,base,shadow]
[pagename,26,10,0,base,shadow],
[@pokemon.name,46,56,0,base,shadow],
[@pokemon.level.to_s,46,86,0,Color.new(64,64,64),Color.new(176,176,176)],
[_INTL("Item"),66,312,0,base,shadow]
]
# Write the held item's name
if @pokemon.hasItem?
textpos.push([@pokemon.item.name,16,352,0,Color.new(64,64,64),Color.new(176,176,176)])
textpos.push([@pokemon.item.name,16,346,0,Color.new(64,64,64),Color.new(176,176,176)])
else
textpos.push([_INTL("None"),16,352,0,Color.new(192,200,208),Color.new(208,216,224)])
textpos.push([_INTL("None"),16,346,0,Color.new(192,200,208),Color.new(208,216,224)])
end
# Write the gender symbol
if @pokemon.male?
textpos.push([_INTL(""),178,62,0,Color.new(24,112,216),Color.new(136,168,208)])
textpos.push([_INTL(""),178,56,0,Color.new(24,112,216),Color.new(136,168,208)])
elsif @pokemon.female?
textpos.push([_INTL(""),178,62,0,Color.new(248,56,32),Color.new(224,152,144)])
textpos.push([_INTL(""),178,56,0,Color.new(248,56,32),Color.new(224,152,144)])
end
# Draw all text
pbDrawTextPositions(overlay,textpos)
@@ -386,12 +386,12 @@ class PokemonSummary_Scene
end
# Write various bits of text
textpos = [
[_INTL("Dex No."),238,80,0,base,shadow],
[_INTL("Species"),238,112,0,base,shadow],
[@pokemon.speciesName,435,112,2,Color.new(64,64,64),Color.new(176,176,176)],
[_INTL("Type"),238,144,0,base,shadow],
[_INTL("OT"),238,176,0,base,shadow],
[_INTL("ID No."),238,208,0,base,shadow],
[_INTL("Dex No."),238,74,0,base,shadow],
[_INTL("Species"),238,106,0,base,shadow],
[@pokemon.speciesName,435,106,2,Color.new(64,64,64),Color.new(176,176,176)],
[_INTL("Type"),238,138,0,base,shadow],
[_INTL("OT"),238,170,0,base,shadow],
[_INTL("ID No."),238,202,0,base,shadow],
]
# Write the Regional/National Dex number
dexnum = GameData::Species.get(@pokemon.species).id_number
@@ -410,15 +410,15 @@ class PokemonSummary_Scene
end
end
if dexnum<=0
textpos.push(["???",435,80,2,dexNumBase,dexNumShadow])
textpos.push(["???",435,74,2,dexNumBase,dexNumShadow])
else
dexnum -= 1 if dexnumshift
textpos.push([sprintf("%03d",dexnum),435,80,2,dexNumBase,dexNumShadow])
textpos.push([sprintf("%03d",dexnum),435,74,2,dexNumBase,dexNumShadow])
end
# Write Original Trainer's name and ID number
if @pokemon.owner.name.empty?
textpos.push([_INTL("RENTAL"),435,176,2,Color.new(64,64,64),Color.new(176,176,176)])
textpos.push(["?????",435,208,2,Color.new(64,64,64),Color.new(176,176,176)])
textpos.push([_INTL("RENTAL"),435,170,2,Color.new(64,64,64),Color.new(176,176,176)])
textpos.push(["?????",435,202,2,Color.new(64,64,64),Color.new(176,176,176)])
else
ownerbase = Color.new(64,64,64)
ownershadow = Color.new(176,176,176)
@@ -430,12 +430,12 @@ class PokemonSummary_Scene
ownerbase = Color.new(248, 56, 32)
ownershadow = Color.new(224, 152, 144)
end
textpos.push([@pokemon.owner.name,435,176,2,ownerbase,ownershadow])
textpos.push([sprintf("%05d",@pokemon.owner.public_id),435,208,2,Color.new(64,64,64),Color.new(176,176,176)])
textpos.push([@pokemon.owner.name,435,170,2,ownerbase,ownershadow])
textpos.push([sprintf("%05d",@pokemon.owner.public_id),435,202,2,Color.new(64,64,64),Color.new(176,176,176)])
end
# Write Exp text OR heart gauge message (if a Shadow Pokémon)
if @pokemon.shadowPokemon?
textpos.push([_INTL("Heart Gauge"),238,240,0,base,shadow])
textpos.push([_INTL("Heart Gauge"),238,234,0,base,shadow])
heartmessage = [_INTL("The door to its heart is open! Undo the final lock!"),
_INTL("The door to its heart is almost fully open."),
_INTL("The door to its heart is nearly open."),
@@ -446,10 +446,10 @@ class PokemonSummary_Scene
drawFormattedTextEx(overlay,234,304,264,memo)
else
endexp = @pokemon.growth_rate.minimum_exp_for_level(@pokemon.level + 1)
textpos.push([_INTL("Exp. Points"),238,240,0,base,shadow])
textpos.push([@pokemon.exp.to_s_formatted,488,272,1,Color.new(64,64,64),Color.new(176,176,176)])
textpos.push([_INTL("To Next Lv."),238,304,0,base,shadow])
textpos.push([(endexp-@pokemon.exp).to_s_formatted,488,336,1,Color.new(64,64,64),Color.new(176,176,176)])
textpos.push([_INTL("Exp. Points"),238,234,0,base,shadow])
textpos.push([@pokemon.exp.to_s_formatted,488,266,1,Color.new(64,64,64),Color.new(176,176,176)])
textpos.push([_INTL("To Next Lv."),238,298,0,base,shadow])
textpos.push([(endexp-@pokemon.exp).to_s_formatted,488,330,1,Color.new(64,64,64),Color.new(176,176,176)])
end
# Draw all text
pbDrawTextPositions(overlay,textpos)
@@ -493,15 +493,15 @@ class PokemonSummary_Scene
pbDrawImagePositions(overlay,imagepos)
# Write various bits of text
textpos = [
[_INTL("TRAINER MEMO"),26,16,0,base,shadow],
[@pokemon.name,46,62,0,base,shadow],
[_INTL("Item"),66,318,0,base,shadow]
[_INTL("TRAINER MEMO"),26,10,0,base,shadow],
[@pokemon.name,46,56,0,base,shadow],
[_INTL("Item"),66,312,0,base,shadow]
]
# Write the held item's name
if @pokemon.hasItem?
textpos.push([@pokemon.item.name,16,352,0,Color.new(64,64,64),Color.new(176,176,176)])
textpos.push([@pokemon.item.name,16,346,0,Color.new(64,64,64),Color.new(176,176,176)])
else
textpos.push([_INTL("None"),16,352,0,Color.new(192,200,208),Color.new(208,216,224)])
textpos.push([_INTL("None"),16,346,0,Color.new(192,200,208),Color.new(208,216,224)])
end
# Draw all text
pbDrawTextPositions(overlay,textpos)
@@ -530,7 +530,7 @@ class PokemonSummary_Scene
eggstate = _INTL("Sounds can be heard coming from inside! It will hatch soon!") if @pokemon.steps_to_hatch < 1275
memo += sprintf("<c3=404040,B0B0B0>%s\n",eggstate)
# Draw all text
drawFormattedTextEx(overlay,232,78,268,memo)
drawFormattedTextEx(overlay,232,82,268,memo)
# Draw the Pokémon's markings
drawMarkings(overlay,84,292)
end
@@ -627,7 +627,7 @@ class PokemonSummary_Scene
memo += sprintf("<c3=404040,B0B0B0>%s\n", characteristics[best_stat][best_iv % 5])
end
# Write all text
drawFormattedTextEx(overlay,232,78,268,memo)
drawFormattedTextEx(overlay,232,82,268,memo)
end
def drawPageThree
@@ -645,24 +645,24 @@ class PokemonSummary_Scene
end
# Write various bits of text
textpos = [
[_INTL("HP"),292,76,2,base,statshadows[:HP]],
[sprintf("%d/%d",@pokemon.hp,@pokemon.totalhp),462,76,1,Color.new(64,64,64),Color.new(176,176,176)],
[_INTL("Attack"),248,120,0,base,statshadows[:ATTACK]],
[sprintf("%d",@pokemon.attack),456,120,1,Color.new(64,64,64),Color.new(176,176,176)],
[_INTL("Defense"),248,152,0,base,statshadows[:DEFENSE]],
[sprintf("%d",@pokemon.defense),456,152,1,Color.new(64,64,64),Color.new(176,176,176)],
[_INTL("Sp. Atk"),248,184,0,base,statshadows[:SPECIAL_ATTACK]],
[sprintf("%d",@pokemon.spatk),456,184,1,Color.new(64,64,64),Color.new(176,176,176)],
[_INTL("Sp. Def"),248,216,0,base,statshadows[:SPECIAL_DEFENSE]],
[sprintf("%d",@pokemon.spdef),456,216,1,Color.new(64,64,64),Color.new(176,176,176)],
[_INTL("Speed"),248,248,0,base,statshadows[:SPEED]],
[sprintf("%d",@pokemon.speed),456,248,1,Color.new(64,64,64),Color.new(176,176,176)],
[_INTL("Ability"),224,284,0,base,shadow]
[_INTL("HP"),292,70,2,base,statshadows[:HP]],
[sprintf("%d/%d",@pokemon.hp,@pokemon.totalhp),462,70,1,Color.new(64,64,64),Color.new(176,176,176)],
[_INTL("Attack"),248,114,0,base,statshadows[:ATTACK]],
[sprintf("%d",@pokemon.attack),456,114,1,Color.new(64,64,64),Color.new(176,176,176)],
[_INTL("Defense"),248,146,0,base,statshadows[:DEFENSE]],
[sprintf("%d",@pokemon.defense),456,146,1,Color.new(64,64,64),Color.new(176,176,176)],
[_INTL("Sp. Atk"),248,178,0,base,statshadows[:SPECIAL_ATTACK]],
[sprintf("%d",@pokemon.spatk),456,178,1,Color.new(64,64,64),Color.new(176,176,176)],
[_INTL("Sp. Def"),248,210,0,base,statshadows[:SPECIAL_DEFENSE]],
[sprintf("%d",@pokemon.spdef),456,210,1,Color.new(64,64,64),Color.new(176,176,176)],
[_INTL("Speed"),248,242,0,base,statshadows[:SPEED]],
[sprintf("%d",@pokemon.speed),456,242,1,Color.new(64,64,64),Color.new(176,176,176)],
[_INTL("Ability"),224,278,0,base,shadow]
]
# Draw ability name and description
ability = @pokemon.ability
if ability
textpos.push([ability.name,362,284,0,Color.new(64,64,64),Color.new(176,176,176)])
textpos.push([ability.name,362,278,0,Color.new(64,64,64),Color.new(176,176,176)])
drawTextEx(overlay,224,316,282,2,ability.description,Color.new(64,64,64),Color.new(176,176,176))
end
# Draw all text
@@ -700,12 +700,12 @@ class PokemonSummary_Scene
textpos = []
imagepos = []
# Write move names, types and PP amounts for each known move
yPos = 98
yPos = 92
for i in 0...Pokemon::MAX_MOVES
move=@pokemon.moves[i]
if move
type_number = GameData::Type.get(move.type).id_number
imagepos.push(["Graphics/Pictures/types", 248, yPos + 2, 0, type_number * 28, 64, 28])
imagepos.push(["Graphics/Pictures/types", 248, yPos + 8, 0, type_number * 28, 64, 28])
textpos.push([move.name,316,yPos,0,moveBase,moveShadow])
if move.total_pp>0
textpos.push([_INTL("PP"),342,yPos+32,0,moveBase,moveShadow])
@@ -750,14 +750,14 @@ class PokemonSummary_Scene
end
# Write various bits of text
textpos = [
[_INTL("MOVES"),26,16,0,base,shadow],
[_INTL("CATEGORY"),20,122,0,base,shadow],
[_INTL("POWER"),20,154,0,base,shadow],
[_INTL("ACCURACY"),20,186,0,base,shadow]
[_INTL("MOVES"),26,10,0,base,shadow],
[_INTL("CATEGORY"),20,116,0,base,shadow],
[_INTL("POWER"),20,148,0,base,shadow],
[_INTL("ACCURACY"),20,180,0,base,shadow]
]
imagepos = []
# Write move names, types and PP amounts for each known move
yPos = 98
yPos = 92
yPos -= 76 if move_to_learn
limit = (move_to_learn) ? Pokemon::MAX_MOVES + 1 : Pokemon::MAX_MOVES
for i in 0...limit
@@ -768,7 +768,7 @@ class PokemonSummary_Scene
end
if move
type_number = GameData::Type.get(move.type).id_number
imagepos.push(["Graphics/Pictures/types", 248, yPos + 2, 0, type_number * 28, 64, 28])
imagepos.push(["Graphics/Pictures/types", 248, yPos + 8, 0, type_number * 28, 64, 28])
textpos.push([move.name,316,yPos,0,moveBase,moveShadow])
if move.total_pp>0
textpos.push([_INTL("PP"),342,yPos+32,0,moveBase,moveShadow])
@@ -815,14 +815,14 @@ class PokemonSummary_Scene
textpos = []
# Write power and accuracy values for selected move
case selected_move.base_damage
when 0 then textpos.push(["---", 216, 154, 1, base, shadow]) # Status move
when 1 then textpos.push(["???", 216, 154, 1, base, shadow]) # Variable power move
else textpos.push([selected_move.base_damage.to_s, 216, 154, 1, base, shadow])
when 0 then textpos.push(["---", 216, 148, 1, base, shadow]) # Status move
when 1 then textpos.push(["???", 216, 148, 1, base, shadow]) # Variable power move
else textpos.push([selected_move.base_damage.to_s, 216, 148, 1, base, shadow])
end
if selected_move.accuracy == 0
textpos.push(["---", 216, 186, 1, base, shadow])
textpos.push(["---", 216, 180, 1, base, shadow])
else
textpos.push(["#{selected_move.accuracy}%", 216 + overlay.text_size("%").width, 186, 1, base, shadow])
textpos.push(["#{selected_move.accuracy}%", 216 + overlay.text_size("%").width, 180, 1, base, shadow])
end
# Draw all text
pbDrawTextPositions(overlay, textpos)
@@ -839,8 +839,8 @@ class PokemonSummary_Scene
@sprites["downarrow"].visible = false
# Write various bits of text
textpos = [
[_INTL("No. of Ribbons:"),234,332,0,Color.new(64,64,64),Color.new(176,176,176)],
[@pokemon.numRibbons.to_s,450,332,1,Color.new(64,64,64),Color.new(176,176,176)],
[_INTL("No. of Ribbons:"),234,326,0,Color.new(64,64,64),Color.new(176,176,176)],
[@pokemon.numRibbons.to_s,450,326,1,Color.new(64,64,64),Color.new(176,176,176)],
]
# Draw all text
pbDrawTextPositions(overlay,textpos)
@@ -879,7 +879,7 @@ class PokemonSummary_Scene
pbDrawImagePositions(overlay,imagepos)
# Draw name of selected ribbon
textpos = [
[name,18,286,0,nameBase,nameShadow]
[name,18,280,0,nameBase,nameShadow]
]
pbDrawTextPositions(overlay,textpos)
# Draw selected ribbon's description
@@ -1089,9 +1089,9 @@ class PokemonSummary_Scene
@sprites["markingoverlay"].bitmap.blt(300+58*(i%3),154+50*(i/3),@markingbitmap.bitmap,markrect)
end
textpos = [
[_INTL("Mark {1}",pokemon.name),366,96,2,base,shadow],
[_INTL("OK"),366,248,2,base,shadow],
[_INTL("Cancel"),366,298,2,base,shadow]
[_INTL("Mark {1}",pokemon.name),366,90,2,base,shadow],
[_INTL("OK"),366,242,2,base,shadow],
[_INTL("Cancel"),366,292,2,base,shadow]
]
pbDrawTextPositions(@sprites["markingoverlay"].bitmap,textpos)
redraw = false

View File

@@ -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

View File

@@ -42,7 +42,7 @@ class PokegearButton < SpriteWrapper
rect.y = @button.height/2 if @selected
self.bitmap.blt(0,0,@button.bitmap,rect)
textpos = [
[@name,self.bitmap.width/2,10,2,Color.new(248,248,248),Color.new(40,40,40)],
[@name,self.bitmap.width/2,4,2,Color.new(248,248,248),Color.new(40,40,40)],
]
pbDrawTextPositions(self.bitmap,textpos)
imagepos = [

View File

@@ -47,9 +47,9 @@ class MapBottomSprite < SpriteWrapper
def refresh
self.bitmap.clear
textpos = [
[@mapname,18,-2,0,Color.new(248,248,248),Color.new(0,0,0)],
[@maplocation,18,354,0,Color.new(248,248,248),Color.new(0,0,0)],
[@mapdetails,Graphics.width-16,354,1,Color.new(248,248,248),Color.new(0,0,0)]
[@mapname,18,-8,0,Color.new(248,248,248),Color.new(0,0,0)],
[@maplocation,18,348,0,Color.new(248,248,248),Color.new(0,0,0)],
[@mapdetails,Graphics.width-16,348,1,Color.new(248,248,248),Color.new(0,0,0)]
]
pbDrawTextPositions(self.bitmap,textpos)
end

View File

@@ -49,18 +49,18 @@ class PokemonTrainerCard_Scene
$PokemonGlobal.startTime.day,
$PokemonGlobal.startTime.year)
textPositions = [
[_INTL("Name"),34,64,0,baseColor,shadowColor],
[$Trainer.name,302,64,1,baseColor,shadowColor],
[_INTL("ID No."),332,64,0,baseColor,shadowColor],
[sprintf("%05d",$Trainer.public_ID),468,64,1,baseColor,shadowColor],
[_INTL("Money"),34,112,0,baseColor,shadowColor],
[_INTL("${1}",$Trainer.money.to_s_formatted),302,112,1,baseColor,shadowColor],
[_INTL("Pokédex"),34,160,0,baseColor,shadowColor],
[sprintf("%d/%d",$Trainer.owned_count,$Trainer.seen_count),302,160,1,baseColor,shadowColor],
[_INTL("Time"),34,208,0,baseColor,shadowColor],
[time,302,208,1,baseColor,shadowColor],
[_INTL("Started"),34,256,0,baseColor,shadowColor],
[starttime,302,256,1,baseColor,shadowColor]
[_INTL("Name"),34,58,0,baseColor,shadowColor],
[$Trainer.name,302,58,1,baseColor,shadowColor],
[_INTL("ID No."),332,58,0,baseColor,shadowColor],
[sprintf("%05d",$Trainer.public_ID),468,58,1,baseColor,shadowColor],
[_INTL("Money"),34,106,0,baseColor,shadowColor],
[_INTL("${1}",$Trainer.money.to_s_formatted),302,106,1,baseColor,shadowColor],
[_INTL("Pokédex"),34,154,0,baseColor,shadowColor],
[sprintf("%d/%d",$Trainer.owned_count,$Trainer.seen_count),302,154,1,baseColor,shadowColor],
[_INTL("Time"),34,202,0,baseColor,shadowColor],
[time,302,202,1,baseColor,shadowColor],
[_INTL("Started"),34,250,0,baseColor,shadowColor],
[starttime,302,250,1,baseColor,shadowColor]
]
pbDrawTextPositions(overlay,textPositions)
x = 72

View File

@@ -62,31 +62,31 @@ class PokemonLoadPanel < SpriteWrapper
end
textpos = []
if @isContinue
textpos.push([@title,16*2,5*2,0,TEXTCOLOR,TEXTSHADOWCOLOR])
textpos.push([_INTL("Badges:"),16*2,56*2,0,TEXTCOLOR,TEXTSHADOWCOLOR])
textpos.push([@trainer.badge_count.to_s,103*2,56*2,1,TEXTCOLOR,TEXTSHADOWCOLOR])
textpos.push([_INTL("Pokédex:"),16*2,72*2,0,TEXTCOLOR,TEXTSHADOWCOLOR])
textpos.push([@trainer.seen_count.to_s,103*2,72*2,1,TEXTCOLOR,TEXTSHADOWCOLOR])
textpos.push([_INTL("Time:"),16*2,88*2,0,TEXTCOLOR,TEXTSHADOWCOLOR])
textpos.push([@title,16*2,2*2,0,TEXTCOLOR,TEXTSHADOWCOLOR])
textpos.push([_INTL("Badges:"),16*2,53*2,0,TEXTCOLOR,TEXTSHADOWCOLOR])
textpos.push([@trainer.badge_count.to_s,103*2,53*2,1,TEXTCOLOR,TEXTSHADOWCOLOR])
textpos.push([_INTL("Pokédex:"),16*2,69*2,0,TEXTCOLOR,TEXTSHADOWCOLOR])
textpos.push([@trainer.seen_count.to_s,103*2,69*2,1,TEXTCOLOR,TEXTSHADOWCOLOR])
textpos.push([_INTL("Time:"),16*2,85*2,0,TEXTCOLOR,TEXTSHADOWCOLOR])
hour = @totalsec / 60 / 60
min = @totalsec / 60 % 60
if hour>0
textpos.push([_INTL("{1}h {2}m",hour,min),103*2,88*2,1,TEXTCOLOR,TEXTSHADOWCOLOR])
textpos.push([_INTL("{1}h {2}m",hour,min),103*2,85*2,1,TEXTCOLOR,TEXTSHADOWCOLOR])
else
textpos.push([_INTL("{1}m",min),103*2,88*2,1,TEXTCOLOR,TEXTSHADOWCOLOR])
textpos.push([_INTL("{1}m",min),103*2,85*2,1,TEXTCOLOR,TEXTSHADOWCOLOR])
end
if @trainer.male?
textpos.push([@trainer.name,56*2,32*2,0,MALETEXTCOLOR,MALETEXTSHADOWCOLOR])
textpos.push([@trainer.name,56*2,29*2,0,MALETEXTCOLOR,MALETEXTSHADOWCOLOR])
elsif @trainer.female?
textpos.push([@trainer.name,56*2,32*2,0,FEMALETEXTCOLOR,FEMALETEXTSHADOWCOLOR])
textpos.push([@trainer.name,56*2,29*2,0,FEMALETEXTCOLOR,FEMALETEXTSHADOWCOLOR])
else
textpos.push([@trainer.name,56*2,32*2,0,TEXTCOLOR,TEXTSHADOWCOLOR])
textpos.push([@trainer.name,56*2,29*2,0,TEXTCOLOR,TEXTSHADOWCOLOR])
end
mapname = pbGetMapNameFromId(@mapid)
mapname.gsub!(/\\PN/,@trainer.name)
textpos.push([mapname,193*2,5*2,1,TEXTCOLOR,TEXTSHADOWCOLOR])
textpos.push([mapname,193*2,2*2,1,TEXTCOLOR,TEXTSHADOWCOLOR])
else
textpos.push([@title,16*2,4*2,0,TEXTCOLOR,TEXTSHADOWCOLOR])
textpos.push([@title,16*2,1*2,0,TEXTCOLOR,TEXTSHADOWCOLOR])
end
pbDrawTextPositions(self.bitmap,textpos)
end

View File

@@ -208,8 +208,7 @@ class Window_PokemonOption < Window_DrawableCommand
rect = drawCursor(index,rect)
optionname = (index==@options.length) ? _INTL("Cancel") : @options[index].name
optionwidth = rect.width*9/20
text_y = rect.y + 6
pbDrawShadowText(self.contents,rect.x,text_y,optionwidth,rect.height,optionname,
pbDrawShadowText(self.contents,rect.x,rect.y,optionwidth,rect.height,optionname,
@nameBaseColor,@nameShadowColor)
return if index==@options.length
if @options[index].is_a?(EnumOption)
@@ -223,7 +222,7 @@ class Window_PokemonOption < Window_DrawableCommand
xpos = optionwidth+rect.x
ivalue = 0
for value in @options[index].values
pbDrawShadowText(self.contents,xpos,text_y,optionwidth,rect.height,value,
pbDrawShadowText(self.contents,xpos,rect.y,optionwidth,rect.height,value,
(ivalue==self[index]) ? @selBaseColor : self.baseColor,
(ivalue==self[index]) ? @selShadowColor : self.shadowColor
)
@@ -232,14 +231,14 @@ class Window_PokemonOption < Window_DrawableCommand
ivalue += 1
end
else
pbDrawShadowText(self.contents,rect.x+optionwidth,text_y,optionwidth,rect.height,
pbDrawShadowText(self.contents,rect.x+optionwidth,rect.y,optionwidth,rect.height,
optionname,self.baseColor,self.shadowColor)
end
elsif @options[index].is_a?(NumberOption)
value = _INTL("Type {1}/{2}",@options[index].optstart+self[index],
@options[index].optend-@options[index].optstart+1)
xpos = optionwidth+rect.x
pbDrawShadowText(self.contents,xpos,text_y,optionwidth,rect.height,value,
pbDrawShadowText(self.contents,xpos,rect.y,optionwidth,rect.height,value,
@selBaseColor,@selShadowColor)
elsif @options[index].is_a?(SliderOption)
value = sprintf(" %d",@options[index].optend)
@@ -253,12 +252,12 @@ class Window_PokemonOption < Window_DrawableCommand
8,16,@selBaseColor)
value = sprintf("%d",@options[index].optstart+self[index])
xpos += optionwidth-self.contents.text_size(value).width
pbDrawShadowText(self.contents,xpos,text_y,optionwidth,rect.height,value,
pbDrawShadowText(self.contents,xpos,rect.y,optionwidth,rect.height,value,
@selBaseColor,@selShadowColor)
else
value = @options[index].values[self[index]]
xpos = optionwidth+rect.x
pbDrawShadowText(self.contents,xpos,text_y,optionwidth,rect.height,value,
pbDrawShadowText(self.contents,xpos,rect.y,optionwidth,rect.height,value,
@selBaseColor,@selShadowColor)
end
end

View File

@@ -71,16 +71,16 @@ class ReadyMenuButton < SpriteWrapper
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,18,2,Color.new(248,248,248),Color.new(40,40,40),1],
[@command[1],textx,16,2,Color.new(248,248,248),Color.new(40,40,40),1],
]
if !@command[2]
if !GameData::Item.get(@command[0]).is_important?
qty = $PokemonBag.pbQuantity(@command[0])
if qty>99
textpos.push([_INTL(">99"),230,18,1,
textpos.push([_INTL(">99"),230,16,1,
Color.new(248,248,248),Color.new(40,40,40),1])
else
textpos.push([_INTL("x{1}",qty),230,18,1,
textpos.push([_INTL("x{1}",qty),230,16,1,
Color.new(248,248,248),Color.new(40,40,40),1])
end
end

View File

@@ -409,7 +409,7 @@ class PokemonBoxSprite < SpriteWrapper
pbSetSystemFont(@contents)
widthval = @contents.text_size(boxname).width
xval = 162-(widthval/2)
pbDrawShadowText(@contents,xval,8 + 6,widthval,32,
pbDrawShadowText(@contents,xval,8,widthval,32,
boxname,Color.new(248,248,248),Color.new(40,48,48))
@refreshBox = false
end
@@ -1316,8 +1316,8 @@ class PokemonStorageScene
@sprites["markingoverlay"].bitmap.blt(336+58*(i%3),106+50*(i/3),@markingbitmap.bitmap,markrect)
end
textpos = [
[_INTL("OK"),402,210,2,base,shadow,1],
[_INTL("Cancel"),402,274,2,base,shadow,1]
[_INTL("OK"),402,208,2,base,shadow,1],
[_INTL("Cancel"),402,272,2,base,shadow,1]
]
pbDrawTextPositions(@sprites["markingoverlay"].bitmap,textpos)
pbMarkingSetArrow(@sprites["arrow"],index)
@@ -1412,26 +1412,26 @@ class PokemonStorageScene
nonshadow = Color.new(224,224,224)
pokename = pokemon.name
textstrings = [
[pokename,10,8,false,base,shadow]
[pokename,10,2,false,base,shadow]
]
if !pokemon.egg?
imagepos = []
if pokemon.male?
textstrings.push([_INTL(""),148,8,false,Color.new(24,112,216),Color.new(136,168,208)])
textstrings.push([_INTL(""),148,2,false,Color.new(24,112,216),Color.new(136,168,208)])
elsif pokemon.female?
textstrings.push([_INTL(""),148,8,false,Color.new(248,56,32),Color.new(224,152,144)])
textstrings.push([_INTL(""),148,2,false,Color.new(248,56,32),Color.new(224,152,144)])
end
imagepos.push(["Graphics/Pictures/Storage/overlay_lv",6,246])
textstrings.push([pokemon.level.to_s,28,234,false,base,shadow])
textstrings.push([pokemon.level.to_s,28,228,false,base,shadow])
if pokemon.ability
textstrings.push([pokemon.ability.name,86,306,2,base,shadow])
textstrings.push([pokemon.ability.name,86,300,2,base,shadow])
else
textstrings.push([_INTL("No ability"),86,306,2,nonbase,nonshadow])
textstrings.push([_INTL("No ability"),86,300,2,nonbase,nonshadow])
end
if pokemon.item
textstrings.push([pokemon.item.name,86,342,2,base,shadow])
textstrings.push([pokemon.item.name,86,336,2,base,shadow])
else
textstrings.push([_INTL("No item"),86,342,2,nonbase,nonshadow])
textstrings.push([_INTL("No item"),86,336,2,nonbase,nonshadow])
end
if pokemon.shiny?
imagepos.push(["Graphics/Pictures/shiny",156,198])

View File

@@ -30,20 +30,19 @@ class Window_PokemonItemStorage < Window_DrawableCommand
def drawItem(index,_count,rect)
rect = drawCursor(index,rect)
ypos = rect.y
textpos = []
if index==@bag.length
textpos.push([_INTL("CANCEL"),rect.x,ypos,false,self.baseColor,self.shadowColor])
textpos.push([_INTL("CANCEL"),rect.x,rect.y-6,false,self.baseColor,self.shadowColor])
else
item = @bag[index][0]
itemname = @adapter.getDisplayName(item)
baseColor = (index==@sortIndex) ? Color.new(248,24,24) : self.baseColor
textpos.push([itemname,rect.x,ypos,false,self.baseColor,self.shadowColor])
textpos.push([itemname,rect.x,rect.y-6,false,self.baseColor,self.shadowColor])
if !GameData::Item.get(item).is_important? # Not a Key item or HM (or infinite TM)
qty = _ISPRINTF("x{1: 2d}",@bag[index][1])
sizeQty = self.contents.text_size(qty).width
xQty = rect.x+rect.width-sizeQty-2
textpos.push([qty,xQty,ypos,false,baseColor,self.shadowColor])
textpos.push([qty,xQty,rect.y-6,false,baseColor,self.shadowColor])
end
end
pbDrawTextPositions(self.contents,textpos)
@@ -283,50 +282,50 @@ module UIHelper
helpwindow.letterbyletter = false
curnumber = initnum
ret = 0
using(numwindow = Window_UnformattedTextPokemon.new("x000")) {
numwindow.viewport = helpwindow.viewport
numwindow.letterbyletter = false
numwindow.text = _ISPRINTF("x{1:03d}",curnumber)
numwindow.resizeToFit(numwindow.text,Graphics.width)
pbBottomRight(numwindow)
helpwindow.resizeHeightToFit(helpwindow.text,Graphics.width-numwindow.width)
pbBottomLeft(helpwindow)
loop do
Graphics.update
Input.update
numwindow.update
(block_given?) ? yield : helpwindow.update
if Input.trigger?(Input::BACK)
ret = 0
pbPlayCancelSE
break
elsif Input.trigger?(Input::USE)
ret = curnumber
pbPlayDecisionSE
break
elsif Input.repeat?(Input::UP)
curnumber += 1
curnumber = 1 if curnumber>maximum
numwindow.text = _ISPRINTF("x{1:03d}",curnumber)
pbPlayCursorSE
elsif Input.repeat?(Input::DOWN)
curnumber -= 1
curnumber = maximum if curnumber<1
numwindow.text = _ISPRINTF("x{1:03d}",curnumber)
pbPlayCursorSE
elsif Input.repeat?(Input::LEFT)
curnumber -= 10
curnumber = 1 if curnumber<1
numwindow.text = _ISPRINTF("x{1:03d}",curnumber)
pbPlayCursorSE
elsif Input.repeat?(Input::RIGHT)
curnumber += 10
curnumber = maximum if curnumber>maximum
numwindow.text = _ISPRINTF("x{1:03d}",curnumber)
pbPlayCursorSE
end
numwindow = Window_UnformattedTextPokemon.new("x000")
numwindow.viewport = helpwindow.viewport
numwindow.letterbyletter = false
numwindow.text = _ISPRINTF("x{1:03d}",curnumber)
numwindow.resizeToFit(numwindow.text,Graphics.width)
pbBottomRight(numwindow)
helpwindow.resizeHeightToFit(helpwindow.text,Graphics.width-numwindow.width)
pbBottomLeft(helpwindow)
loop do
Graphics.update
Input.update
numwindow.update
helpwindow.update
if Input.trigger?(Input::BACK)
ret = 0
pbPlayCancelSE
break
elsif Input.trigger?(Input::USE)
ret = curnumber
pbPlayDecisionSE
break
elsif Input.repeat?(Input::UP)
curnumber += 1
curnumber = 1 if curnumber>maximum
numwindow.text = _ISPRINTF("x{1:03d}",curnumber)
pbPlayCursorSE
elsif Input.repeat?(Input::DOWN)
curnumber -= 1
curnumber = maximum if curnumber<1
numwindow.text = _ISPRINTF("x{1:03d}",curnumber)
pbPlayCursorSE
elsif Input.repeat?(Input::LEFT)
curnumber -= 10
curnumber = 1 if curnumber<1
numwindow.text = _ISPRINTF("x{1:03d}",curnumber)
pbPlayCursorSE
elsif Input.repeat?(Input::RIGHT)
curnumber += 10
curnumber = maximum if curnumber>maximum
numwindow.text = _ISPRINTF("x{1:03d}",curnumber)
pbPlayCursorSE
end
}
end
numwindow.dispose
helpwindow.visible = oldvisible
return ret
end

View File

@@ -63,16 +63,16 @@ class MoveRelearner_Scene
overlay.blt(436,70,@typebitmap.bitmap,type2rect)
end
textpos=[
[_INTL("Teach which move?"),16,8,0,Color.new(88,88,80),Color.new(168,184,184)]
[_INTL("Teach which move?"),16,2,0,Color.new(88,88,80),Color.new(168,184,184)]
]
imagepos=[]
yPos=82
yPos=76
for i in 0...VISIBLEMOVES
moveobject=@moves[@sprites["commands"].top_item+i]
if moveobject
moveData=GameData::Move.get(moveobject)
type_number = GameData::Type.get(moveData.type).id_number
imagepos.push(["Graphics/Pictures/types", 12, yPos + 2, 0, type_number * 28, 64, 28])
imagepos.push(["Graphics/Pictures/types", 12, yPos + 8, 0, type_number * 28, 64, 28])
textpos.push([moveData.name,80,yPos,0,Color.new(248,248,248),Color.new(0,0,0)])
if moveData.total_pp>0
textpos.push([_INTL("PP"),112,yPos+32,0,Color.new(64,64,64),Color.new(176,176,176)])
@@ -92,13 +92,13 @@ class MoveRelearner_Scene
basedamage=selMoveData.base_damage
category=selMoveData.category
accuracy=selMoveData.accuracy
textpos.push([_INTL("CATEGORY"),272,114,0,Color.new(248,248,248),Color.new(0,0,0)])
textpos.push([_INTL("POWER"),272,146,0,Color.new(248,248,248),Color.new(0,0,0)])
textpos.push([_INTL("CATEGORY"),272,108,0,Color.new(248,248,248),Color.new(0,0,0)])
textpos.push([_INTL("POWER"),272,140,0,Color.new(248,248,248),Color.new(0,0,0)])
textpos.push([basedamage<=1 ? basedamage==1 ? "???" : "---" : sprintf("%d",basedamage),
468,146,2,Color.new(64,64,64),Color.new(176,176,176)])
textpos.push([_INTL("ACCURACY"),272,178,0,Color.new(248,248,248),Color.new(0,0,0)])
468,140,2,Color.new(64,64,64),Color.new(176,176,176)])
textpos.push([_INTL("ACCURACY"),272,172,0,Color.new(248,248,248),Color.new(0,0,0)])
textpos.push([accuracy==0 ? "---" : "#{accuracy}%",
468,178,2,Color.new(64,64,64),Color.new(176,176,176)])
468,172,2,Color.new(64,64,64),Color.new(176,176,176)])
pbDrawTextPositions(overlay,textpos)
imagepos.push(["Graphics/Pictures/category",436,116,0,category*28,64,28])
if @sprites["commands"].index<@moves.length-1
@@ -127,7 +127,7 @@ class MoveRelearner_Scene
pbDrawMoveList
end
if Input.trigger?(Input::BACK)
return 0
return nil
elsif Input.trigger?(Input::USE)
return @moves[@sprites["commands"].index]
end

View File

@@ -643,10 +643,10 @@ class Window_PurifyChamberSets < Window_DrawableCommand
rect=drawCursor(index,rect)
if index==@switching
textpos.push([(index+1).to_s,rect.x,
rect.y,false,Color.new(248,0,0),self.shadowColor])
rect.y-6,false,Color.new(248,0,0),self.shadowColor])
else
textpos.push([(index+1).to_s,rect.x,
rect.y,false,self.baseColor,self.shadowColor])
rect.y-6,false,self.baseColor,self.shadowColor])
end
if @chamber.setCount(index)>0
pbDrawGauge(self.contents,Rect.new(rect.x+16,rect.y+6,48,8),
@@ -934,14 +934,14 @@ class PurifyChamberSetView < SpriteWrapper
textpos=[]
if pkmn
if pkmn.type1==pkmn.type2
textpos.push([_INTL("{1} Lv.{2} {3}",pkmn.name,pkmn.level,GameData::Type.get(pkmn.type1).name),2,0,0,
textpos.push([_INTL("{1} Lv.{2} {3}",pkmn.name,pkmn.level,GameData::Type.get(pkmn.type1).name),2,-6,0,
Color.new(248,248,248),Color.new(128,128,128)])
else
textpos.push([_INTL("{1} Lv.{2} {3}/{4}",pkmn.name,pkmn.level,GameData::Type.get(pkmn.type1).name,
GameData::Type.get(pkmn.type2).name),2,0,0,
GameData::Type.get(pkmn.type2).name),2,-6,0,
Color.new(248,248,248),Color.new(128,128,128)])
end
textpos.push([_INTL("FLOW"),2+@info.bitmap.width/2,24,0,
textpos.push([_INTL("FLOW"),2+@info.bitmap.width/2,18,0,
Color.new(248,248,248),Color.new(128,128,128)])
# draw heart gauge
pbDrawGauge(@info.bitmap, Rect.new(@info.bitmap.width*3/4,8,@info.bitmap.width*1/4,8),
@@ -951,7 +951,7 @@ class PurifyChamberSetView < SpriteWrapper
Color.new(0,0,248),@chamber.chamberFlow(@set),6)
end
if @chamber.setCount(@set)>0
textpos.push([_INTL("TEMPO"),2,24,0,
textpos.push([_INTL("TEMPO"),2,18,0,
Color.new(248,248,248),Color.new(128,128,128)])
# draw tempo gauge
pbDrawGauge(@info.bitmap,Rect.new(@info.bitmap.width*1/4,24+8,@info.bitmap.width*1/4,8),

View File

@@ -154,15 +154,15 @@ class Window_PokemonMart < Window_DrawableCommand
rect = drawCursor(index, rect)
ypos = rect.y
if index == count-1
textpos.push([_INTL("CANCEL"), rect.x, ypos + 2, false, self.baseColor, self.shadowColor])
textpos.push([_INTL("CANCEL"), rect.x, ypos - 4, false, self.baseColor, self.shadowColor])
else
item = @stock[index]
itemname = @adapter.getDisplayName(item)
qty = @adapter.getDisplayPrice(item)
sizeQty = self.contents.text_size(qty).width
xQty = rect.x + rect.width - sizeQty - 2 - 16
textpos.push([itemname, rect.x, ypos + 2, false, self.baseColor, self.shadowColor])
textpos.push([qty, xQty, ypos + 2, false, self.baseColor, self.shadowColor])
textpos.push([itemname, rect.x, ypos - 4, false, self.baseColor, self.shadowColor])
textpos.push([qty, xQty, ypos - 4, false, self.baseColor, self.shadowColor])
end
pbDrawTextPositions(self.contents, textpos)
end

View File

@@ -309,16 +309,16 @@ class HallOfFame_Scene
dexnumber = _ISPRINTF("No. {1:03d}",species_data.id_number)
end
textPositions=[
[dexnumber,32,Graphics.height-80,0,BASECOLOR,SHADOWCOLOR],
[pokename,Graphics.width-192,Graphics.height-80,2,BASECOLOR,SHADOWCOLOR],
[dexnumber,32,Graphics.height-86,0,BASECOLOR,SHADOWCOLOR],
[pokename,Graphics.width-192,Graphics.height-86,2,BASECOLOR,SHADOWCOLOR],
[_INTL("Lv. {1}",pokemon.egg? ? "?" : pokemon.level),
64,Graphics.height-48,0,BASECOLOR,SHADOWCOLOR],
64,Graphics.height-54,0,BASECOLOR,SHADOWCOLOR],
[_INTL("IDNo.{1}",pokemon.egg? ? "?????" : idno),
Graphics.width-192,Graphics.height-48,2,BASECOLOR,SHADOWCOLOR]
Graphics.width-192,Graphics.height-54,2,BASECOLOR,SHADOWCOLOR]
]
if (hallNumber>-1)
textPositions.push([_INTL("Hall of Fame No."),Graphics.width/2-104,0,0,BASECOLOR,SHADOWCOLOR])
textPositions.push([hallNumber.to_s,Graphics.width/2+104,0,1,BASECOLOR,SHADOWCOLOR])
textPositions.push([_INTL("Hall of Fame No."),Graphics.width/2-104,-6,0,BASECOLOR,SHADOWCOLOR])
textPositions.push([hallNumber.to_s,Graphics.width/2+104,-6,1,BASECOLOR,SHADOWCOLOR])
end
pbDrawTextPositions(overlay,textPositions)
end
@@ -327,7 +327,7 @@ class HallOfFame_Scene
overlay=@sprites["overlay"].bitmap
overlay.clear
pbDrawTextPositions(overlay,[[_INTL("Welcome to the Hall of Fame!"),
Graphics.width/2,Graphics.height-80,2,BASECOLOR,SHADOWCOLOR]])
Graphics.width/2,Graphics.height-80,-4,BASECOLOR,SHADOWCOLOR]])
end
def pbAnimationLoop