[Mobile] fix portrait mode homescreen menu on startup

This commit is contained in:
Anthony Calosa
2021-02-03 19:16:29 +08:00
parent 0c08facd80
commit 4ad4e5584b
2 changed files with 3 additions and 1 deletions

View File

@@ -216,7 +216,7 @@ public class Forge implements ApplicationListener {
SoundSystem.instance.setBackgroundMusic(MusicPlaylist.MENUS); //start background music SoundSystem.instance.setBackgroundMusic(MusicPlaylist.MENUS); //start background music
destroyThis = false; //Allow back() destroyThis = false; //Allow back()
Gdx.input.setCatchKey(Keys.MENU, true); Gdx.input.setCatchKey(Keys.MENU, true);
openHomeScreen(1); openHomeScreen(0); //default for startup
splashScreen = null; splashScreen = null;
boolean isLandscapeMode = isLandscapeMode(); boolean isLandscapeMode = isLandscapeMode();

View File

@@ -144,6 +144,8 @@ public class HomeScreen extends FScreen {
} }
public void openMenu(int index){ public void openMenu(int index){
if (index == 0)
return; //menu on startup for portrait mode
if (index < 6) if (index < 6)
NewGameMenu.getPreferredScreen().open(); NewGameMenu.getPreferredScreen().open();
if (index == 6) if (index == 6)