From fea136b9472d5f81022e3d47ae88d388509861fe Mon Sep 17 00:00:00 2001 From: Evan Debenham Date: Wed, 3 Aug 2022 13:07:02 -0400 Subject: [PATCH] v1.4.0: fixed alignment issues in about scene --- .../shatteredpixeldungeon/scenes/AboutScene.java | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/AboutScene.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/AboutScene.java index 7cd241305..3065f45ea 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/AboutScene.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/AboutScene.java @@ -357,12 +357,14 @@ public class AboutScene extends PixelScene { avatar.x = x; body.maxWidth((int)(width() - avatar.width - 1)); - if (avatar.height() > body.height()){ - avatar.y = topY; - body.setPos( avatar.x + avatar.width() + 1, topY + (avatar.height() - body.height())/2f); - topY += avatar.height() + 1; + float fullAvHeight = Math.max(avatar.height(), 16); + if (fullAvHeight > body.height()){ + avatar.y = topY + (fullAvHeight - avatar.height())/2f; + PixelScene.align(avatar); + body.setPos( avatar.x + avatar.width() + 1, topY + (fullAvHeight - body.height())/2f); + topY += fullAvHeight + 1; } else { - avatar.y = topY + (body.height() - avatar.height())/2f; + avatar.y = topY + (body.height() - fullAvHeight)/2f; PixelScene.align(avatar); body.setPos( avatar.x + avatar.width() + 1, topY); topY += body.height() + 2;