-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMenu.cpp
78 lines (61 loc) · 1.87 KB
/
Menu.cpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
#include "Menu.h"
#include "Game.h"
#include "Resources.h"
#include "Graphics.h"
#include "GUI.h"
Menu::Menu()
{
}
Menu::~Menu()
{
}
int currentMenu = 0;
bool gameMenu = 0;
int currentOption = 1;
void Menu::render(){
switch (game.state){
case 0:
break;
case 1: //Actual Main Menu + Other Menus (Credits/Options)
switch (currentMenu){
case 0: // Home Menu
graphics.draw(0, 0, resources.mapBackground2, graphics.screen);
graphics.draw(200, 404, resources.objectTree, graphics.screen);
graphics.draw(300, 402, resources.objectTree, graphics.screen);
graphics.draw(400, 402, resources.objectTree, graphics.screen);
graphics.draw(500, 402, resources.objectTree, graphics.screen);
graphics.draw(600, 405, resources.objectTree, graphics.screen);
graphics.draw(700, 408, resources.objectTree, graphics.screen);
graphics.draw(800, 410, resources.objectTree, graphics.screen);
graphics.draw(900, 406, resources.objectTree, graphics.screen);
graphics.draw(1000, 406, resources.objectTree, graphics.screen);
graphics.draw(0, 275, resources.objectHouse, graphics.screen);
graphics.draw(1100, 402, resources.objectCandyCane, graphics.screen);
graphics.draw(0, 20, resources.coreLogo, graphics.screen);
gui.addButton(gui.PLAY, 1050, 50);
gui.addButton(gui.OPTIONS, 1050, 150);
gui.addButton(gui.EXIT, 1050, 250);
break;
case 1: // Instructions
graphics.draw(0, 0, resources.menuMainInstructions, graphics.screen);
gui.addButton(gui.BACK, 20, 500);
break;
case 2: // Options
graphics.draw(0, 0, resources.menuGameOptions, graphics.screen);
gui.addButton(gui.BACK, 900, 570);
break;
case 3: // Game Over
graphics.draw(0, 0, resources.menuMainGameOver, graphics.screen);
gui.addButton(gui.BACK, 20, 500);
break;
}
break;
case 2: // Gameplay Menu
if (gameMenu){
}
break;
case 3:
break;
}
}
Menu menu;