Hey guys,
I am trying to make cool main menu,but i am not sure how to do this correctly.
so i am trying to make something like this:
at the start:
--> Start
How to play
Exit
after clicked down arrow:
Start
--> How to play
Exit
after clicked down arrow twice:
Start
How to play
--> Exit
I hope you get the point. ;)
This is what i have done so far:
Code:
#include <iostream>
#include <conio.h>
#include <windows.h>
using namespace std;
int main()
{
int option;
cout<<" Menu:"<<endl;
cout<<'\t'<<"--> "<<" Start"<<endl;
cout<<'\t'<<" How to play"<<endl;
cout<<'\t'<<" Exit"<<endl;
while( option != 27){
option = getch();
switch(option){
case 80:
cout<<" --> "<<" How to play"<<endl;
break;
case 72:
cout<<" - "<<endl;
break;
case 27:
cout<<" - "<<endl;
break;
}
}
return 0;
}
Hope for help, Thanks in advance! ;)