Continue is default widget on title if save file exists.
This commit is contained in:
parent
eaea32c934
commit
834e03c531
|
@ -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;
|
||||||
|
@ -206,11 +216,8 @@ static void newGame(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
static void continueGame(void)
|
static void continueGame(void)
|
||||||
{
|
|
||||||
if (fileExists(getSaveFilePath("game.save")))
|
|
||||||
{
|
{
|
||||||
loadGame();
|
loadGame();
|
||||||
}
|
|
||||||
|
|
||||||
initGalacticMap();
|
initGalacticMap();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue