More fixes to text positions

This commit is contained in:
Maruno17
2020-10-20 21:44:09 +01:00
parent 9fd8e5fab3
commit 103d397938
8 changed files with 31 additions and 26 deletions

View File

@@ -17,9 +17,9 @@ 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,64,rect.height,
pbDrawShadowText(self.contents,rect.x+254,rect.y + (mkxp? ? 6 : 0),64,rect.height,
sprintf("%d",@commands2[index][0]),self.baseColor,self.shadowColor,1)
pbDrawShadowText(self.contents,rect.x+350,rect.y,64,rect.height,
pbDrawShadowText(self.contents,rect.x+350,rect.y + (mkxp? ? 6 : 0),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])

View File

@@ -45,7 +45,7 @@ class Window_Pokedex < Window_DrawableCommand
else
text = sprintf("%03d ----------",indexNumber)
end
pbDrawShadowText(self.contents,rect.x+36,rect.y+6,rect.width,rect.height,
pbDrawShadowText(self.contents,rect.x+36,rect.y+6 + (mkxp? ? 6 : 0),rect.width,rect.height,
text,self.baseColor,self.shadowColor)
end

View File

@@ -122,7 +122,8 @@ 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,rect.width,rect.height,@commands[index],base,shadow)
pbDrawShadowText(self.contents,rect.x,rect.y + (mkxp? ? 6 : 0),rect.width,rect.height,
@commands[index],base,shadow)
end
end

View File

@@ -331,7 +331,8 @@ class Window_PokemonOption < Window_DrawableCommand
rect = drawCursor(index,rect)
optionname = (index==@options.length) ? _INTL("Cancel") : @options[index].name
optionwidth = rect.width*9/20
pbDrawShadowText(self.contents,rect.x,rect.y,optionwidth,rect.height,optionname,
text_y = rect.y + (mkxp? ? 6 : 0)
pbDrawShadowText(self.contents,rect.x,text_y,optionwidth,rect.height,optionname,
@nameBaseColor,@nameShadowColor)
return if index==@options.length
if @options[index].is_a?(EnumOption)
@@ -345,7 +346,7 @@ class Window_PokemonOption < Window_DrawableCommand
xpos = optionwidth+rect.x
ivalue = 0
for value in @options[index].values
pbDrawShadowText(self.contents,xpos,rect.y,optionwidth,rect.height,value,
pbDrawShadowText(self.contents,xpos,text_y,optionwidth,rect.height,value,
(ivalue==self[index]) ? @selBaseColor : self.baseColor,
(ivalue==self[index]) ? @selShadowColor : self.shadowColor
)
@@ -354,14 +355,14 @@ class Window_PokemonOption < Window_DrawableCommand
ivalue += 1
end
else
pbDrawShadowText(self.contents,rect.x+optionwidth,rect.y,optionwidth,rect.height,
pbDrawShadowText(self.contents,rect.x+optionwidth,text_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,rect.y,optionwidth,rect.height,value,
pbDrawShadowText(self.contents,xpos,text_y,optionwidth,rect.height,value,
@selBaseColor,@selShadowColor)
elsif @options[index].is_a?(SliderOption)
value = sprintf(" %d",@options[index].optend)
@@ -375,12 +376,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,rect.y,optionwidth,rect.height,value,
pbDrawShadowText(self.contents,xpos,text_y,optionwidth,rect.height,value,
@selBaseColor,@selShadowColor)
else
value = @options[index].values[self[index]]
xpos = optionwidth+rect.x
pbDrawShadowText(self.contents,xpos,rect.y,optionwidth,rect.height,value,
pbDrawShadowText(self.contents,xpos,text_y,optionwidth,rect.height,value,
@selBaseColor,@selShadowColor)
end
end

View File

@@ -413,7 +413,8 @@ class PokemonBoxSprite < SpriteWrapper
pbSetSystemFont(@contents)
widthval = @contents.text_size(boxname).width
xval = 162-(widthval/2)
pbDrawShadowText(@contents,xval,8,widthval,32,boxname,Color.new(248,248,248),Color.new(40,48,48))
pbDrawShadowText(@contents,xval,8 + (mkxp? ? 6 : 0),widthval,32,
boxname,Color.new(248,248,248),Color.new(40,48,48))
@refreshBox = false
end
yval = self.y+30
@@ -536,7 +537,7 @@ class PokemonBoxPartySprite < SpriteWrapper
def refresh
@contents.blt(0,0,@boxbitmap.bitmap,Rect.new(0,0,172,352))
pbDrawTextPositions(self.bitmap,[
[_INTL("Back"),86,242,2,Color.new(248,248,248),Color.new(80,80,80),1]
[_INTL("Back"),86,242 - (mkxp? ? 2 : 0),2,Color.new(248,248,248),Color.new(80,80,80),1]
])
xvalues = [18,90,18,90,18,90]
@@ -1384,8 +1385,8 @@ class PokemonStorageScene
buttonbase = Color.new(248,248,248)
buttonshadow = Color.new(80,80,80)
pbDrawTextPositions(overlay,[
[_INTL("Party: {1}",(@storage.party.length rescue 0)),270,328,2,buttonbase,buttonshadow,1],
[_INTL("Exit"),446,328,2,buttonbase,buttonshadow,1],
[_INTL("Party: {1}",(@storage.party.length rescue 0)),270,328 - (mkxp? ? 2 : 0),2,buttonbase,buttonshadow,1],
[_INTL("Exit"),446,328 - (mkxp? ? 2 : 0),2,buttonbase,buttonshadow,1],
])
pokemon = nil
if @screen.pbHeldPokemon