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

@@ -1066,7 +1066,7 @@ class Window_UnformattedTextPokemon < SpriteWindow_Base
def resizeHeightToFit(text,width=-1) # width is current window width
dims=resizeToFitInternal(text,width)
self.width=width<0 ? Graphics.width : width
self.height=dims[1]+self.borderY
self.height = dims[1] + self.borderY - (mkxp? ? 4 : 0)
refresh
end
@@ -2326,7 +2326,7 @@ class Window_AdvancedCommandPokemon < Window_DrawableCommand
dims=[]
getAutoDims(commands,dims,width)
self.width=dims[0]
self.height=dims[1]
self.height=dims[1] - (mkxp? ? 6 : 0)
end
def itemCount
@@ -2338,7 +2338,7 @@ class Window_AdvancedCommandPokemon < Window_DrawableCommand
rect=drawCursor(index,rect)
if toUnformattedText(@commands[index]).gsub(/\n/,"")==@commands[index]
# Use faster alternative for unformatted text without line breaks
pbDrawShadowText(self.contents,rect.x,rect.y,rect.width,rect.height,
pbDrawShadowText(self.contents,rect.x,rect.y + (mkxp? ? 6 : 0),rect.width,rect.height,
@commands[index],self.baseColor,self.shadowColor)
else
chars=getFormattedText(

View File

@@ -49,16 +49,16 @@ class Window_CharacterEntry < Window_DrawableCommand
def drawItem(index,_count,rect)
rect=drawCursor(index,rect)
if index==@charset.length # -1
pbDrawShadowText(self.contents,rect.x,rect.y,rect.width,rect.height,"[ ]",
pbDrawShadowText(self.contents,rect.x,rect.y + (mkxp? ? 6 : 0),rect.width,rect.height,"[ ]",
self.baseColor,self.shadowColor)
elsif index==@charset.length+1 # -2
pbDrawShadowText(self.contents,rect.x,rect.y,rect.width,rect.height,@othercharset,
pbDrawShadowText(self.contents,rect.x,rect.y + (mkxp? ? 6 : 0),rect.width,rect.height,@othercharset,
self.baseColor,self.shadowColor)
elsif index==@charset.length+2 # -3
pbDrawShadowText(self.contents,rect.x,rect.y,rect.width,rect.height,_INTL("OK"),
pbDrawShadowText(self.contents,rect.x,rect.y + (mkxp? ? 6 : 0),rect.width,rect.height,_INTL("OK"),
self.baseColor,self.shadowColor)
else
pbDrawShadowText(self.contents,rect.x,rect.y,rect.width,rect.height,@charset[index],
pbDrawShadowText(self.contents,rect.x,rect.y + (mkxp? ? 6 : 0),rect.width,rect.height,@charset[index],
self.baseColor,self.shadowColor)
end
end