From 74f9b4db3d66bb713094f14eb66e8fbb96aeea0b Mon Sep 17 00:00:00 2001 From: Fernando Dodino Date: Mon, 1 Jul 2019 20:10:18 -0300 Subject: [PATCH] =?UTF-8?q?Fix=20#1663=20-=20Game=20se=20cuelga=20al=20lan?= =?UTF-8?q?zar=20error=20con=20m=C3=A1s=20de=20un=20salto=20de=20l=C3=ADne?= =?UTF-8?q?a?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../org/uqbar/project/wollok/game/VisualComponent.xtend | 1 - .../org/uqbar/project/wollok/game/gameboard/Window.xtend | 7 +++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/org.uqbar.project.wollok.game/src/org/uqbar/project/wollok/game/VisualComponent.xtend b/org.uqbar.project.wollok.game/src/org/uqbar/project/wollok/game/VisualComponent.xtend index f92fa76c2e..3ec3ba6975 100644 --- a/org.uqbar.project.wollok.game/src/org/uqbar/project/wollok/game/VisualComponent.xtend +++ b/org.uqbar.project.wollok.game/src/org/uqbar/project/wollok/game/VisualComponent.xtend @@ -66,7 +66,6 @@ abstract class VisualComponent { this.addMessage(end, color) return } - balloonMessages.add(new BalloonMessage(message, color)) } diff --git a/org.uqbar.project.wollok.game/src/org/uqbar/project/wollok/game/gameboard/Window.xtend b/org.uqbar.project.wollok.game/src/org/uqbar/project/wollok/game/gameboard/Window.xtend index 1064942ac9..2f902e9eac 100644 --- a/org.uqbar.project.wollok.game/src/org/uqbar/project/wollok/game/gameboard/Window.xtend +++ b/org.uqbar.project.wollok.game/src/org/uqbar/project/wollok/game/gameboard/Window.xtend @@ -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) @@ -103,6 +105,7 @@ class Window { patchIndex++ textX = 5 } + val x = xInPixels + (DELTA_TO_VISUAL_COMPONENT * adjustmentX) var adjustmentY = 1 var textY = 0