Skip to content

Commit

Permalink
Fix #1663 - Game se cuelga al lanzar error con más de un salto de línea
Browse files Browse the repository at this point in the history
  • Loading branch information
fdodino committed Jul 1, 2019
1 parent 1e59b7d commit 74f9b4d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,6 @@ abstract class VisualComponent {
this.addMessage(end, color)
return
}

balloonMessages.add(new BalloonMessage(message, color))
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,10 @@ class Window {
var plusWidth = 0
glyphLayout.reset
this.setText(newText, baseWidth, color)

while (glyphLayout.height > 29) {

var previousHeight = 0f
while (glyphLayout.height > 29 && previousHeight !== glyphLayout.height) {
previousHeight = glyphLayout.height
glyphLayout.reset
plusWidth += 10
this.setText(newText, baseWidth + plusWidth, color)
Expand All @@ -103,6 +105,7 @@ class Window {
patchIndex++
textX = 5
}

val x = xInPixels + (DELTA_TO_VISUAL_COMPONENT * adjustmentX)
var adjustmentY = 1
var textY = 0
Expand Down

0 comments on commit 74f9b4d

Please sign in to comment.