v1.4.0: fixed alignment issues in about scene

This commit is contained in:
Evan Debenham
2022-08-03 13:07:02 -04:00
parent 88f2cb7a36
commit fea136b947
@@ -357,12 +357,14 @@ public class AboutScene extends PixelScene {
avatar.x = x; avatar.x = x;
body.maxWidth((int)(width() - avatar.width - 1)); body.maxWidth((int)(width() - avatar.width - 1));
if (avatar.height() > body.height()){ float fullAvHeight = Math.max(avatar.height(), 16);
avatar.y = topY; if (fullAvHeight > body.height()){
body.setPos( avatar.x + avatar.width() + 1, topY + (avatar.height() - body.height())/2f); avatar.y = topY + (fullAvHeight - avatar.height())/2f;
topY += avatar.height() + 1; PixelScene.align(avatar);
body.setPos( avatar.x + avatar.width() + 1, topY + (fullAvHeight - body.height())/2f);
topY += fullAvHeight + 1;
} else { } else {
avatar.y = topY + (body.height() - avatar.height())/2f; avatar.y = topY + (body.height() - fullAvHeight)/2f;
PixelScene.align(avatar); PixelScene.align(avatar);
body.setPos( avatar.x + avatar.width() + 1, topY); body.setPos( avatar.x + avatar.width() + 1, topY);
topY += body.height() + 2; topY += body.height() + 2;