Continue is default widget on title if save file exists.

This commit is contained in:
Steve 2015-10-20 13:45:28 +01:00
parent eaea32c934
commit 834e03c531
1 changed files with 12 additions and 5 deletions

View File

@ -70,7 +70,17 @@ void initTitle(void)
initFighters(); initFighters();
if (fileExists(getSaveFilePath("game.save")))
{
selectWidget("continue", "title");
}
else
{
getWidget("continue", "title")->enabled = 0;
selectWidget("newGame", "title"); selectWidget("newGame", "title");
}
getWidget("newGame", "title")->action = newGame; getWidget("newGame", "title")->action = newGame;
getWidget("continue", "title")->action = continueGame; getWidget("continue", "title")->action = continueGame;
getWidget("options", "title")->action = options; getWidget("options", "title")->action = options;
@ -207,10 +217,7 @@ static void newGame(void)
static void continueGame(void) static void continueGame(void)
{ {
if (fileExists(getSaveFilePath("game.save")))
{
loadGame(); loadGame();
}
initGalacticMap(); initGalacticMap();
} }