v0.9.4: improved layout code for news scene info button

This commit is contained in:
Evan Debenham 2021-08-07 18:09:49 -04:00
parent bc6185b077
commit 04df6287b2

View File

@ -244,7 +244,9 @@ public class NewsScene extends PixelScene {
if (button != null){ if (button != null){
height += 4; height += 4;
button.setSize(button.reqWidth()+2, 16); button.multiline = true;
button.setSize(width - bg.marginHor(), 16);
button.setSize(width - bg.marginHor(), Math.max(button.reqHeight(), 16));
button.setPos(x + (width - button.width())/2, y + height); button.setPos(x + (width - button.width())/2, y + height);
height = button.bottom() - y; height = button.bottom() - y;
} }