-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcMenu.cpp
More file actions
50 lines (39 loc) · 773 Bytes
/
cMenu.cpp
File metadata and controls
50 lines (39 loc) · 773 Bytes
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
#include "cMenu.h"
cMenu::cMenu(void)
{
this->selectedOption = 0;
this->numOptions = 4; // first menu
this->typeMenu = MENU_PRINCIPAL;
}
cMenu::~cMenu(void)
{
}
void cMenu::increaseSO()
{
this->selectedOption++;
if(this->selectedOption == this->numOptions) this->selectedOption = 0;
}
void cMenu::descreaseSO()
{
this->selectedOption--;
if(this->selectedOption < 0) this->selectedOption = (this->numOptions) - 1;
}
void cMenu::setSO(int num){
this->selectedOption = num;
}
int cMenu::getSO()
{
return this->selectedOption;
}
int cMenu::getTypeMenu()
{
return this->typeMenu;
}
void cMenu::setTypeMenu(int type)
{
this->typeMenu = type;
}
void cMenu::setNumOptions(int num)
{
this->numOptions = num;
}