Show trophies menu option on Challenges and Galactic Map screen.
This commit is contained in:
parent
29620620c8
commit
b44794f19b
|
@ -1,21 +1,11 @@
|
||||||
[
|
[
|
||||||
{
|
|
||||||
"name" : "start",
|
|
||||||
"group" : "challenges",
|
|
||||||
"type" : "WT_BUTTON",
|
|
||||||
"text" : "Start Challenge Mission",
|
|
||||||
"x" : -1,
|
|
||||||
"y" : 680,
|
|
||||||
"w" : 250,
|
|
||||||
"h": 34
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
"name" : "resume",
|
"name" : "resume",
|
||||||
"group" : "challengesMenu",
|
"group" : "challengesMenu",
|
||||||
"type" : "WT_BUTTON",
|
"type" : "WT_BUTTON",
|
||||||
"text" : "Resume",
|
"text" : "Resume",
|
||||||
"x" : -1,
|
"x" : -1,
|
||||||
"y" : 215,
|
"y" : 170,
|
||||||
"w" : 200,
|
"w" : 200,
|
||||||
"h": 34
|
"h": 34
|
||||||
},
|
},
|
||||||
|
@ -25,7 +15,17 @@
|
||||||
"type" : "WT_BUTTON",
|
"type" : "WT_BUTTON",
|
||||||
"text" : "Stats",
|
"text" : "Stats",
|
||||||
"x" : -1,
|
"x" : -1,
|
||||||
"y" : 315,
|
"y" : 270,
|
||||||
|
"w" : 200,
|
||||||
|
"h": 34
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name" : "trophies",
|
||||||
|
"group" : "challengesMenu",
|
||||||
|
"type" : "WT_BUTTON",
|
||||||
|
"text" : "Trophies",
|
||||||
|
"x" : -1,
|
||||||
|
"y" : 370,
|
||||||
"w" : 200,
|
"w" : 200,
|
||||||
"h": 34
|
"h": 34
|
||||||
},
|
},
|
||||||
|
@ -35,7 +35,7 @@
|
||||||
"type" : "WT_BUTTON",
|
"type" : "WT_BUTTON",
|
||||||
"text" : "Options",
|
"text" : "Options",
|
||||||
"x" : -1,
|
"x" : -1,
|
||||||
"y" : 415,
|
"y" : 470,
|
||||||
"w" : 200,
|
"w" : 200,
|
||||||
"h": 34
|
"h": 34
|
||||||
},
|
},
|
||||||
|
@ -45,8 +45,18 @@
|
||||||
"type" : "WT_BUTTON",
|
"type" : "WT_BUTTON",
|
||||||
"text" : "Return to Title",
|
"text" : "Return to Title",
|
||||||
"x" : -1,
|
"x" : -1,
|
||||||
"y" : 515,
|
"y" : 570,
|
||||||
"w" : 200,
|
"w" : 200,
|
||||||
"h": 34
|
"h": 34
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name" : "start",
|
||||||
|
"group" : "challenges",
|
||||||
|
"type" : "WT_BUTTON",
|
||||||
|
"text" : "Start Challenge Mission",
|
||||||
|
"x" : -1,
|
||||||
|
"y" : 680,
|
||||||
|
"w" : 250,
|
||||||
|
"h": 34
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
"type" : "WT_BUTTON",
|
"type" : "WT_BUTTON",
|
||||||
"text" : "Resume",
|
"text" : "Resume",
|
||||||
"x" : -1,
|
"x" : -1,
|
||||||
"y" : 215,
|
"y" : 170,
|
||||||
"w" : 200,
|
"w" : 200,
|
||||||
"h": 34
|
"h": 34
|
||||||
},
|
},
|
||||||
|
@ -15,7 +15,17 @@
|
||||||
"type" : "WT_BUTTON",
|
"type" : "WT_BUTTON",
|
||||||
"text" : "Stats",
|
"text" : "Stats",
|
||||||
"x" : -1,
|
"x" : -1,
|
||||||
"y" : 315,
|
"y" : 270,
|
||||||
|
"w" : 200,
|
||||||
|
"h": 34
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name" : "trophies",
|
||||||
|
"group" : "galacticMap",
|
||||||
|
"type" : "WT_BUTTON",
|
||||||
|
"text" : "Trophies",
|
||||||
|
"x" : -1,
|
||||||
|
"y" : 370,
|
||||||
"w" : 200,
|
"w" : 200,
|
||||||
"h": 34
|
"h": 34
|
||||||
},
|
},
|
||||||
|
@ -25,7 +35,7 @@
|
||||||
"type" : "WT_BUTTON",
|
"type" : "WT_BUTTON",
|
||||||
"text" : "Options",
|
"text" : "Options",
|
||||||
"x" : -1,
|
"x" : -1,
|
||||||
"y" : 415,
|
"y" : 470,
|
||||||
"w" : 200,
|
"w" : 200,
|
||||||
"h": 34
|
"h": 34
|
||||||
},
|
},
|
||||||
|
@ -35,7 +45,7 @@
|
||||||
"type" : "WT_BUTTON",
|
"type" : "WT_BUTTON",
|
||||||
"text" : "Return to Title",
|
"text" : "Return to Title",
|
||||||
"x" : -1,
|
"x" : -1,
|
||||||
"y" : 515,
|
"y" : 570,
|
||||||
"w" : 200,
|
"w" : 200,
|
||||||
"h": 34
|
"h": 34
|
||||||
},
|
},
|
||||||
|
|
|
@ -29,8 +29,9 @@ static void startChallengeMission(void);
|
||||||
static void drawMenu(void);
|
static void drawMenu(void);
|
||||||
static void resume(void);
|
static void resume(void);
|
||||||
static void stats(void);
|
static void stats(void);
|
||||||
|
static void trophies(void);
|
||||||
static void options(void);
|
static void options(void);
|
||||||
static void statsOK(void);
|
static void ok(void);
|
||||||
static void returnFromOptions(void);
|
static void returnFromOptions(void);
|
||||||
static void unlockChallenges(void);
|
static void unlockChallenges(void);
|
||||||
static void quit(void);
|
static void quit(void);
|
||||||
|
@ -90,10 +91,12 @@ void initChallengeHome(void)
|
||||||
|
|
||||||
getWidget("resume", "challengesMenu")->action = resume;
|
getWidget("resume", "challengesMenu")->action = resume;
|
||||||
getWidget("stats", "challengesMenu")->action = stats;
|
getWidget("stats", "challengesMenu")->action = stats;
|
||||||
|
getWidget("trophies", "challengesMenu")->action = trophies;
|
||||||
getWidget("options", "challengesMenu")->action = options;
|
getWidget("options", "challengesMenu")->action = options;
|
||||||
getWidget("quit", "challengesMenu")->action = quit;
|
getWidget("quit", "challengesMenu")->action = quit;
|
||||||
|
|
||||||
getWidget("ok", "stats")->action = statsOK;
|
getWidget("ok", "stats")->action = ok;
|
||||||
|
getWidget("ok", "trophies")->action = ok;
|
||||||
|
|
||||||
/* select first challenge if none chosen */
|
/* select first challenge if none chosen */
|
||||||
if (!game.currentMission)
|
if (!game.currentMission)
|
||||||
|
@ -254,6 +257,10 @@ static void draw(void)
|
||||||
drawStats();
|
drawStats();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case SHOW_TROPHIES:
|
||||||
|
drawTrophies();
|
||||||
|
break;
|
||||||
|
|
||||||
case SHOW_OPTIONS:
|
case SHOW_OPTIONS:
|
||||||
drawOptions();
|
drawOptions();
|
||||||
break;
|
break;
|
||||||
|
@ -367,7 +374,7 @@ static void drawMenu(void)
|
||||||
SDL_SetRenderDrawBlendMode(app.renderer, SDL_BLENDMODE_NONE);
|
SDL_SetRenderDrawBlendMode(app.renderer, SDL_BLENDMODE_NONE);
|
||||||
|
|
||||||
r.w = 400;
|
r.w = 400;
|
||||||
r.h = 400;
|
r.h = 500;
|
||||||
r.x = (SCREEN_WIDTH / 2) - r.w / 2;
|
r.x = (SCREEN_WIDTH / 2) - r.w / 2;
|
||||||
r.y = (SCREEN_HEIGHT / 2) - r.h / 2;
|
r.y = (SCREEN_HEIGHT / 2) - r.h / 2;
|
||||||
|
|
||||||
|
@ -400,7 +407,16 @@ static void stats(void)
|
||||||
initStatsDisplay();
|
initStatsDisplay();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void statsOK(void)
|
static void trophies(void)
|
||||||
|
{
|
||||||
|
selectWidget("ok", "trophies");
|
||||||
|
|
||||||
|
show = SHOW_TROPHIES;
|
||||||
|
|
||||||
|
initTrophiesDisplay();
|
||||||
|
}
|
||||||
|
|
||||||
|
static void ok(void)
|
||||||
{
|
{
|
||||||
selectWidget("resume", "challengesMenu");
|
selectWidget("resume", "challengesMenu");
|
||||||
|
|
||||||
|
|
|
@ -26,6 +26,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
#define SHOW_MENU 1
|
#define SHOW_MENU 1
|
||||||
#define SHOW_OPTIONS 2
|
#define SHOW_OPTIONS 2
|
||||||
#define SHOW_STATS 3
|
#define SHOW_STATS 3
|
||||||
|
#define SHOW_TROPHIES 4
|
||||||
|
|
||||||
extern void startSectionTransition(void);
|
extern void startSectionTransition(void);
|
||||||
extern void endSectionTransition(void);
|
extern void endSectionTransition(void);
|
||||||
|
@ -64,6 +65,8 @@ extern void doTrophyAlerts(void);
|
||||||
extern void drawTrophyAlert(void);
|
extern void drawTrophyAlert(void);
|
||||||
extern void awardStatsTrophies(void);
|
extern void awardStatsTrophies(void);
|
||||||
extern void awardChallengeTrophies(void);
|
extern void awardChallengeTrophies(void);
|
||||||
|
extern void initTrophiesDisplay(void);
|
||||||
|
extern void drawTrophies(void);
|
||||||
|
|
||||||
extern App app;
|
extern App app;
|
||||||
extern Battle battle;
|
extern Battle battle;
|
||||||
|
|
|
@ -38,8 +38,9 @@ static void addPulses(void);
|
||||||
static void drawMenu(void);
|
static void drawMenu(void);
|
||||||
static void resume(void);
|
static void resume(void);
|
||||||
static void stats(void);
|
static void stats(void);
|
||||||
|
static void trophies(void);
|
||||||
static void options(void);
|
static void options(void);
|
||||||
static void statsOK(void);
|
static void ok(void);
|
||||||
static void quit(void);
|
static void quit(void);
|
||||||
static void startMission(void);
|
static void startMission(void);
|
||||||
static void returnFromOptions(void);
|
static void returnFromOptions(void);
|
||||||
|
@ -108,10 +109,12 @@ void initGalacticMap(void)
|
||||||
|
|
||||||
getWidget("resume", "galacticMap")->action = resume;
|
getWidget("resume", "galacticMap")->action = resume;
|
||||||
getWidget("stats", "galacticMap")->action = stats;
|
getWidget("stats", "galacticMap")->action = stats;
|
||||||
|
getWidget("trophies", "galacticMap")->action = trophies;
|
||||||
getWidget("options", "galacticMap")->action = options;
|
getWidget("options", "galacticMap")->action = options;
|
||||||
getWidget("quit", "galacticMap")->action = quit;
|
getWidget("quit", "galacticMap")->action = quit;
|
||||||
|
|
||||||
getWidget("ok", "stats")->action = statsOK;
|
getWidget("ok", "stats")->action = ok;
|
||||||
|
getWidget("ok", "trophies")->action = ok;
|
||||||
|
|
||||||
getWidget("ok", "fallen")->action = fallenOK;
|
getWidget("ok", "fallen")->action = fallenOK;
|
||||||
|
|
||||||
|
@ -361,6 +364,10 @@ static void draw(void)
|
||||||
drawStats();
|
drawStats();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case SHOW_TROPHIES:
|
||||||
|
drawTrophies();
|
||||||
|
break;
|
||||||
|
|
||||||
case SHOW_OPTIONS:
|
case SHOW_OPTIONS:
|
||||||
drawOptions();
|
drawOptions();
|
||||||
break;
|
break;
|
||||||
|
@ -659,7 +666,7 @@ static void drawMenu(void)
|
||||||
SDL_SetRenderDrawBlendMode(app.renderer, SDL_BLENDMODE_NONE);
|
SDL_SetRenderDrawBlendMode(app.renderer, SDL_BLENDMODE_NONE);
|
||||||
|
|
||||||
r.w = 400;
|
r.w = 400;
|
||||||
r.h = 400;
|
r.h = 500;
|
||||||
r.x = (SCREEN_WIDTH / 2) - r.w / 2;
|
r.x = (SCREEN_WIDTH / 2) - r.w / 2;
|
||||||
r.y = (SCREEN_HEIGHT / 2) - r.h / 2;
|
r.y = (SCREEN_HEIGHT / 2) - r.h / 2;
|
||||||
|
|
||||||
|
@ -692,7 +699,16 @@ static void stats(void)
|
||||||
initStatsDisplay();
|
initStatsDisplay();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void statsOK(void)
|
static void trophies(void)
|
||||||
|
{
|
||||||
|
selectWidget("ok", "trophies");
|
||||||
|
|
||||||
|
show = SHOW_TROPHIES;
|
||||||
|
|
||||||
|
initTrophiesDisplay();
|
||||||
|
}
|
||||||
|
|
||||||
|
static void ok(void)
|
||||||
{
|
{
|
||||||
selectWidget("resume", "galacticMap");
|
selectWidget("resume", "galacticMap");
|
||||||
|
|
||||||
|
|
|
@ -25,6 +25,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
#define SHOW_MENU 2
|
#define SHOW_MENU 2
|
||||||
#define SHOW_OPTIONS 3
|
#define SHOW_OPTIONS 3
|
||||||
#define SHOW_STATS 4
|
#define SHOW_STATS 4
|
||||||
|
#define SHOW_TROPHIES 5
|
||||||
|
|
||||||
extern void drawText(int x, int y, int size, int align, SDL_Color c, const char *format, ...);
|
extern void drawText(int x, int y, int size, int align, SDL_Color c, const char *format, ...);
|
||||||
extern void initBattle(void);
|
extern void initBattle(void);
|
||||||
|
@ -64,6 +65,8 @@ extern void doTrophyAlerts(void);
|
||||||
extern void drawTrophyAlert(void);
|
extern void drawTrophyAlert(void);
|
||||||
extern void awardCampaignTrophies(void);
|
extern void awardCampaignTrophies(void);
|
||||||
extern void awardStatsTrophies(void);
|
extern void awardStatsTrophies(void);
|
||||||
|
extern void initTrophiesDisplay(void);
|
||||||
|
extern void drawTrophies(void);
|
||||||
|
|
||||||
extern App app;
|
extern App app;
|
||||||
extern Colors colors;
|
extern Colors colors;
|
||||||
|
|
|
@ -241,7 +241,7 @@ static void trophies(void)
|
||||||
|
|
||||||
show = SHOW_TROPHIES;
|
show = SHOW_TROPHIES;
|
||||||
|
|
||||||
initTrophyDisplay();
|
initTrophiesDisplay();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void options(void)
|
static void options(void)
|
||||||
|
|
|
@ -57,7 +57,7 @@ extern void selectWidget(const char *name, const char *group);
|
||||||
extern void drawStats(void);
|
extern void drawStats(void);
|
||||||
extern void updateAllMissions(void);
|
extern void updateAllMissions(void);
|
||||||
extern void clearInput(void);
|
extern void clearInput(void);
|
||||||
extern void initTrophyDisplay(void);
|
extern void initTrophiesDisplay(void);
|
||||||
extern void drawTrophies(void);
|
extern void drawTrophies(void);
|
||||||
extern void doTrophies(void);
|
extern void doTrophies(void);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue