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

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