-
Notifications
You must be signed in to change notification settings - Fork 1
/
menu.cpp
52 lines (42 loc) · 1.01 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
#include "menu.h"
const vector< char* >& Menu::tokenize( char links[] )
{
vector< char* > tempVec;
//Tokenize cstring for each seperate link in the cstring.
char* temp = strtok( links, " ," );
for( int i = 0; temp != NULL; ++i )
{
tempVec.push_back( temp );
temp = strtok (NULL, " ,");
}
return tempVec;
}
Menu::Menu()
{
padding = 0;
numLinks = 0;
resourceMgr = ResourceMgr::getInstance();
input = Input::getInstance();
window = Window::getInstance();
}
Menu::Menu( Point upperLeft, char linkTitle[], int padding )
{
linkTitles = tokenize( linkTitle );
numLinks = linkTitles.size();
this->padding = padding;
this->upperLeft = upperLeft;
input = Input::getInstance();
window = Window::getInstance();
resourceMgr = ResourceMgr::getInstance();
}
void Menu::checkInput()
{
}
void Menu::draw()
{
}
Menu::~Menu()
{
input->release();
window->release();
}