Allow viewing of credits from title screen.

This commit is contained in:
Steve 2016-06-07 09:34:22 +01:00
parent a500f137b6
commit 9b15e83df6
3 changed files with 23 additions and 5 deletions

View File

@ -15,7 +15,7 @@
"type" : "WT_BUTTON", "type" : "WT_BUTTON",
"text" : "Challenges", "text" : "Challenges",
"x" : -1, "x" : -1,
"y" : 290, "y" : 280,
"w" : 200, "w" : 200,
"h": 34 "h": 34
}, },
@ -25,7 +25,7 @@
"type" : "WT_BUTTON", "type" : "WT_BUTTON",
"text" : "Trophies", "text" : "Trophies",
"x" : -1, "x" : -1,
"y" : 380, "y" : 360,
"w" : 200, "w" : 200,
"h": 34 "h": 34
}, },
@ -35,7 +35,7 @@
"type" : "WT_BUTTON", "type" : "WT_BUTTON",
"text" : "Stats", "text" : "Stats",
"x" : -1, "x" : -1,
"y" : 470, "y" : 440,
"w" : 200, "w" : 200,
"h": 34 "h": 34
}, },
@ -45,7 +45,17 @@
"type" : "WT_BUTTON", "type" : "WT_BUTTON",
"text" : "Options", "text" : "Options",
"x" : -1, "x" : -1,
"y" : 560, "y" : 520,
"w" : 200,
"h": 34
},
{
"name" : "credits",
"group" : "title",
"type" : "WT_BUTTON",
"text" : "Credits",
"x" : -1,
"y" : 600,
"w" : 200, "w" : 200,
"h": 34 "h": 34
}, },
@ -55,7 +65,7 @@
"type" : "WT_BUTTON", "type" : "WT_BUTTON",
"text" : "Quit", "text" : "Quit",
"x" : -1, "x" : -1,
"y" : 650, "y" : 680,
"w" : 200, "w" : 200,
"h": 34 "h": 34
} }

View File

@ -32,6 +32,7 @@ static void trophies(void);
static void stats(void); static void stats(void);
static void ok(void); static void ok(void);
static void options(void); static void options(void);
static void credits(void);
static void quit(void); static void quit(void);
static void returnFromOptions(void); static void returnFromOptions(void);
@ -82,6 +83,7 @@ void initTitle(void)
getWidget("trophies", "title")->action = trophies; getWidget("trophies", "title")->action = trophies;
getWidget("stats", "title")->action = stats; getWidget("stats", "title")->action = stats;
getWidget("options", "title")->action = options; getWidget("options", "title")->action = options;
getWidget("credits", "title")->action = credits;
getWidget("quit", "title")->action = quit; getWidget("quit", "title")->action = quit;
getWidget("ok", "stats")->action = ok; getWidget("ok", "stats")->action = ok;
@ -278,6 +280,11 @@ static void returnFromOptions(void)
show = SHOW_TITLE; show = SHOW_TITLE;
} }
static void credits(void)
{
initCredits();
}
static void quit(void) static void quit(void)
{ {
exit(0); exit(0);

View File

@ -59,6 +59,7 @@ extern void updateAllMissions(void);
extern void clearInput(void); extern void clearInput(void);
extern void initTrophiesDisplay(void); extern void initTrophiesDisplay(void);
extern void drawTrophies(void); extern void drawTrophies(void);
extern void initCredits(void);
extern App app; extern App app;
extern Battle battle; extern Battle battle;