diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/GamesInProgress.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/GamesInProgress.java index 1746e7295..79247172d 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/GamesInProgress.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/GamesInProgress.java @@ -36,7 +36,7 @@ import java.util.HashMap; public class GamesInProgress { - public static final int MAX_SLOTS = 4; + public static final int MAX_SLOTS = HeroClass.values().length; //null means we have loaded info and it is empty, no entry means unknown. private static HashMap slotStates = new HashMap<>(); diff --git a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/StartScene.java b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/StartScene.java index ff5cfa367..8f84eca90 100644 --- a/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/StartScene.java +++ b/core/src/main/java/com/shatteredpixel/shatteredpixeldungeon/scenes/StartScene.java @@ -78,12 +78,16 @@ public class StartScene extends PixelScene { ArrayList games = GamesInProgress.checkAll(); - int slotGap = landscape() ? 5 : 10; int slotCount = Math.min(GamesInProgress.MAX_SLOTS, games.size()+1); + int slotGap = 10 - slotCount; int slotsHeight = slotCount*SLOT_HEIGHT + (slotCount-1)* slotGap; + + while (slotsHeight > (h-title.bottom()-2)){ + slotGap--; + slotsHeight -= slotCount-1; + } - float yPos = (h - slotsHeight)/2f; - if (landscape()) yPos += 8; + float yPos = (h - slotsHeight + title.bottom() + 2)/2f; for (GamesInProgress.Info game : games) { SaveSlotButton existingGame = new SaveSlotButton();