-
Notifications
You must be signed in to change notification settings - Fork 0
/
MenuSystem.h
executable file
·54 lines (49 loc) · 1.05 KB
/
MenuSystem.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
44
45
46
47
48
49
50
51
52
53
54
/*
* MenuSystem.h
* teapots
*
* Created by Ben Wadsworth on 14/08/2011.
* Copyright 2011 __MyCompanyName__. All rights reserved.
*
*/
#ifndef MENUSYSTEM_H
#define MENUSYSTEM_H
//#include "Menu.h";
#include "MenuItem.h";
#include <string>;
#include <stdlib.h>
#include <vector>
#include <iterator>
#include <iostream>
using namespace std;
class MenuSystem {
float drawLocX, drawLocY;
float itemSizeX, itemSizeY;
std::vector<MenuItem> items;
MenuItem *selected;
MenuItem *parent;
bool controlsShown;
public:
MenuSystem();
void addMenuItem(MenuItem);
void parentChild(MenuItem*,MenuItem*);
MenuItem* getByName(std::string);
void listAllItems();
void listTree(std::string,int);
void printThisManySpaces(int);
void drawChildren(MenuItem*,float,float);
void draw();
float getLocX();
float getLocY();
void moveDown();
void moveUp();
void setLocation(float,float);
void selectItem(MenuItem *);
void makeParent(MenuItem *);
void openSubMenu(MenuItem *);
int executeSelected();
void goBack();
void showControls();
void hideControls();
};
#endif