Im trying to create a Text Based Game and i want to have a 'Game Menu'. This is my code but i dont know exactly how to make the menu. Please Help! I also wouldnt mind if some can tell me how i would be able to integrate a cheat into this.
#include "Library.h"
using namespace std;
void Intro();
void RaceClass();
void Cheats();
int main()
{
HANDLE hOut;
hOut = GetStdHandle (STD_OUTPUT_HANDLE);
SetConsoleTextAttribute (hOut, FOREGROUND_RED);
cout << "\t Vitium Victoria \n\n";
SetConsoleTextAttribute (hOut, FOREGROUND_RED | FOREGROUND_BLUE | FOREGROUND_GREEN);
cout << "Programmed by";
SetConsoleTextAttribute (hOut, FOREGROUND_RED);
cout << "\t Kile Exley \n";
SetConsoleTextAttribute (hOut, FOREGROUND_GREEN | FOREGROUND_BLUE | FOREGROUND_RED);
cout << "Written by";
SetConsoleTextAttribute (hOut, FOREGROUND_RED);
cout << "\t Bryan Exley\n\n\n";
SetConsoleTextAttribute (hOut, FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE);
Intro();
SetConsoleTextAttribute (hOut, FOREGROUND_RED | FOREGROUND_GREEN | FOREGROUND_BLUE);
cout << "\n\n";
system("PAUSE");
return 0;
}
void Intro()
{
HANDLE hOut;
hOut = GetStdHandle (STD_OUTPUT_HANDLE);
char charName[32];
int userRace;
int userClass;
char gmOption;
cout << "Welcome to the world of Vitium Victoria!\n";
cout << "Here you shall find adventures and horrors alike.\n";
cout << "The world is brimming with nightmares waiting to be dreamt;\n";
cout << "treasures and quests waiting to be sought, and fantastical journies to be had!\n\n";
SetConsoleTextAttribute (hOut, FOREGROUND_RED);
cout << "\t Game Menu\n";
SetConsoleTextAttribute (hOut, FOREGROUND_RED | FOREGROUND_BLUE | FOREGROUND_GREEN | BACKGROUND_RED | BACKGROUND_GREEN);
cout << "1 - New Game\n";
cout << "2 - Load\n";
cout << "3 - Cheats\n";
cin >> gmOption;
if (gmOption == 1)
{
RaceClass(); …