ConsoleMenu/main.cpp

47 lines
826 B
C++
Raw Normal View History

2017-05-14 23:18:26 +08:00
#include "ConsoleMenu.h"
#include <string>
#include <vector>
#include <cstdlib>
class myMenu:public menuBase{
public:
myMenu(){
titleText="my test menu";
options.clear();
options.push_back("item1");
options.push_back("item2");
options.push_back("item3");
options.push_back("item4");
infos.clear();
infos.push_back("info1");
infos.push_back("info2");
infos.push_back("info3");
infos.push_back("info4");
menuID = "myMenu";
}
void StatusMove(int status){
switch(status){
case 0:
case 1:
case 2:
case 3:
default:
break;
}
}
};
menuManager* MenuCon;
int main(){
MenuCon = menuManager::GetInstance();
MenuCon->UIRegistion(new myMenu());
MenuCon->UITransform("myMenu");
system("pause");
}