KeeganT

Menu Template

Dec 7th, 2017
365
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.56 KB | None | 0 0
  1. #include <iostream>
  2. #include <windows.h>
  3.  
  4. using namespace std;
  5.  
  6. void color(int num)
  7. {
  8.     HANDLE color=GetStdHandle(STD_OUTPUT_HANDLE);
  9.     SetConsoleTextAttribute(color, num);
  10. }
  11.  
  12. int main()
  13. {
  14.     color(15);
  15.     cout<<"\n\t\t             +-----------+              "<<endl;
  16.     cout<<"\t\t+------------| ";
  17.     color(13);
  18.     cout<<"Main Menu";
  19.     color(15);
  20.     cout<<" |------------+"<<endl;
  21.     cout<<"\t\t|            +-----------+            |"<<endl;
  22.     cout<<"\t\t|                                     |"<<endl;
  23.     cout<<"\t\t|           +-------------+           |"<<endl;
  24.     cout<<"\t\t|           | ";
  25.     color(10);
  26.     cout<<"Tic Tac Toe";
  27.     color(15);
  28.     cout<<" |           |"<<endl;
  29.     cout<<"\t\t|           +-------------+           |"<<endl;
  30.     cout<<"\t\t|                                     |"<<endl;
  31.     cout<<"\t\t|           +-------------+           |"<<endl;
  32.     cout<<"\t\t|           | ";
  33.     color(12);
  34.     cout<<"Master ";
  35.     color(9);
  36.     cout<<"Mind";
  37.     color(15);
  38.     cout<<" |           |"<<endl;
  39.     cout<<"\t\t|           +-------------+           |"<<endl;
  40.     cout<<"\t\t|                                     |"<<endl;
  41.     cout<<"\t\t|           +-------------+           |"<<endl;
  42.     cout<<"\t\t|           |  ";
  43.     color(11);
  44.     cout<<"Blackjack";
  45.     color(15);
  46.     cout<<"  |           |"<<endl;
  47.     cout<<"\t\t|           +-------------+           |"<<endl;
  48.     cout<<"\t\t|                                     |"<<endl;
  49.     cout<<"\t\t+-------------------------------------+"<<endl;
  50.  
  51. }
Advertisement
Add Comment
Please, Sign In to add comment