-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmenu.h
43 lines (39 loc) · 861 Bytes
/
menu.h
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
#include <vector>
#include <string>
#include "SDL.h"
#include "gameData.h"
#include "clock.h"
#include "ioMod.h"
#include "sprite.h"
class Menu {
public:
Menu(SDL_Renderer*);
void draw() const;
void update();
void incrIcon();
void decrIcon();
void lightOn() { currentClick = 1; }
void lightOff() { currentClick = 0; }
int getOptionNo() const { return currentOption; }
Menu(const Menu&) = delete;
Menu& operator=(const Menu&) = delete;
private:
SDL_Renderer* renderer;
Gamedata& gdata;
SDL_Rect hudFrame;
SDL_Color backColor;
SDL_Color menuColor;
Clock& clock;
IoMod& io;
std::vector<std::string> options;
std::vector<int> optionLoc;
std::vector<Sprite> clicks;
int currentClick;
int currentOption;
int spaces;
int startClickX;
int startClickY;
int clickX;
int clickY;
void drawBackground() const;
};