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

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