Access options from hub.

This commit is contained in:
Steve 2018-02-21 08:13:28 +00:00
parent a351849f5c
commit e78c99f5d0
2 changed files with 11 additions and 1 deletions

View File

@ -44,6 +44,7 @@ static void doMissionSelect(void);
static void doMissionInfo(void);
static void drawHudWidgets(void);
static void awardMissionTrophies(void);
static void returnFromOptions(void);
static HubMission hubMissionHead;
static HubMission *hubMissionTail;
@ -634,7 +635,7 @@ static void cancel(void)
static void options(void)
{
initOptions(returnFromOptions);
}
static void stats(void)
@ -661,6 +662,14 @@ static void returnFromTrophyStats(void)
app.keyboard[SDL_SCANCODE_ESCAPE] = 0;
}
static void returnFromOptions(void)
{
app.delegate.logic = logic;
app.delegate.draw = draw;
returnFromTrophyStats();
}
static void loadMissions(void)
{
cJSON *root, *node;

View File

@ -67,6 +67,7 @@ extern void doStats(void);
extern void awardTrophy(char *id);
extern void doTrophies(void);
extern void drawTrophies(void);
extern void initOptions(void (*callback)(void));
extern App app;
extern Colors colors;