From 12fb42e17fe03b35fe44f686486bd4b3f10a4918 Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Fri, 15 Jan 2016 03:29:34 -0500 Subject: [PATCH] v0.3.4: fixed a layout issue with icon titles --- .../shatteredpixel/shatteredpixeldungeon/windows/IconTitle.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/com/shatteredpixel/shatteredpixeldungeon/windows/IconTitle.java b/src/com/shatteredpixel/shatteredpixeldungeon/windows/IconTitle.java index cc8deae48..0b5c72958 100644 --- a/src/com/shatteredpixel/shatteredpixeldungeon/windows/IconTitle.java +++ b/src/com/shatteredpixel/shatteredpixeldungeon/windows/IconTitle.java @@ -81,10 +81,10 @@ public class IconTitle extends Component { imIcon.x = x; imIcon.y = y; + tfLabel.maxWidth((int)(width - (imIcon.x + imIcon.width() + GAP))); tfLabel.setPos(imIcon.x + imIcon.width() + GAP, imIcon.height > tfLabel.height() ? imIcon.y + (imIcon.height() - tfLabel.height()) / 2 : imIcon.y); - tfLabel.maxWidth((int)(width - tfLabel.left())); if (health.visible) { health.setRect( tfLabel.left(), Math.max( tfLabel.top() + tfLabel.height(), imIcon.y + imIcon.height() - health.height() ), tfLabel.maxWidth(), 0 );