v0.3.4: fixed a layout issue with icon titles

This commit is contained in:
Evan Debenham 2016-01-15 03:29:34 -05:00 committed by Evan Debenham
parent a4af888045
commit 12fb42e17f

View File

@ -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 );