Fixed long battle messages displaying weirdly

This commit is contained in:
Maruno17
2023-09-23 19:20:44 +01:00
parent b2c66b7b0c
commit d9c3898124
3 changed files with 10 additions and 13 deletions

View File

@@ -406,19 +406,15 @@ class Window_AdvancedTextPokemon < SpriteWindow_Base
return if !busy?
return if @textchars[@curchar] == "\n"
resume
visiblelines = (self.height - self.borderY) / @lineHeight
loop do
curcharSkip(true)
break if @curchar >= @fmtchars.length # End of message
if @textchars[@curchar] == "\1" # Pause message
if curcharSkip(true)
visiblelines = (self.height - self.borderY) / @lineHeight
if @textchars[@curchar] == "\n" && @linesdrawn >= visiblelines - 1
@scroll_timer_start = System.uptime
elsif @textchars[@curchar] == "\1"
@pausing = true if @curchar < @numtextchars - 1
self.startPause
refresh
break
end
break if @textchars[@curchar] != "\n" # Skip past newlines only
break if @linesdrawn >= visiblelines - 1 # No more empty lines to continue to
@linesdrawn += 1
end
end