v2.5.3: fixed spacing issues in hero select on landscape

This commit is contained in:
Evan Debenham
2024-09-22 16:17:27 -04:00
parent 7c66d1058b
commit cd5c7ef652
4 changed files with 20 additions and 1 deletions
@@ -410,6 +410,12 @@ public class HeroSelectScene extends PixelScene {
heroDesc.setPos((leftPortion - heroDesc.width())/2f, heroName.bottom() + 5); heroDesc.setPos((leftPortion - heroDesc.width())/2f, heroName.bottom() + 5);
align(heroDesc); align(heroDesc);
while(startBtn.top() < heroDesc.bottom()){
heroDesc.maxWidth(heroDesc.maxWidth()+10);
heroDesc.setPos(Math.max(0, (leftPortion - heroDesc.width())/2f), heroName.bottom() + 5);
align(heroDesc);
}
btnFade.visible = btnFade.active = true; btnFade.visible = btnFade.active = true;
startBtn.visible = startBtn.active = true; startBtn.visible = startBtn.active = true;
@@ -50,4 +50,8 @@ public class WndInfoArmorAbility extends WndTitledMessage {
} }
@Override
protected float targetHeight() {
return super.targetHeight()-40;
}
} }
@@ -49,4 +49,9 @@ public class WndInfoSubclass extends WndTitledMessage {
} }
@Override
protected float targetHeight() {
return super.targetHeight()-40;
}
} }
@@ -55,7 +55,7 @@ public class WndTitledMessage extends Window {
add( text ); add( text );
while (PixelScene.landscape() while (PixelScene.landscape()
&& text.bottom() > (PixelScene.MIN_HEIGHT_L - 10) && text.bottom() > targetHeight()
&& width < WIDTH_MAX){ && width < WIDTH_MAX){
width += 20; width += 20;
titlebar.setRect(0, 0, width, 0); titlebar.setRect(0, 0, width, 0);
@@ -71,4 +71,8 @@ public class WndTitledMessage extends Window {
protected boolean useHighlighting(){ protected boolean useHighlighting(){
return true; return true;
} }
protected float targetHeight() {
return PixelScene.MIN_HEIGHT_L - 10;
}
} }