Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Text-based-game/librarymenu.cpp
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
71 lines (54 sloc)
1.16 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "librarymenu.h" | |
using namespace std; | |
void LibraryMenu :: librarymenu() | |
{ | |
Sql sql; | |
//PlayerMenu PlayerMenu; | |
int selection; | |
cout << "\n==================="; | |
cout << "\n Welcome to the Library"; | |
cout << "\n==================="; | |
cout << "\n 1 - Read Books and Journals"; | |
cout << "\n 2 - Go Back"; | |
cout << "\n Enter selection: "; | |
cin >> selection; | |
if (selection == 1) | |
{ | |
cout << "\n you are reading ....... " << endl; | |
{ | |
char key = _getch(); | |
int value = key; | |
int counter = 0; | |
while (1) | |
{ | |
key = _getch(); | |
if (key == KEY_SPACE) | |
{ | |
counter++; | |
} | |
if (counter == 4) | |
{ | |
sql.updateIntelligenceTable(); | |
break; | |
} | |
} | |
key = _getch(); | |
value = key; | |
system("cls"); | |
room MI; | |
MI.DrawFrontBorder(); | |
//PlayerMenu.ppmenu(); | |
} | |
} | |
else if (selection == 2) | |
{ | |
cout << "0 - Chatroom." << endl; | |
cout << "1 - Game Menu." << endl; | |
cout << "2 - Job Menu." << endl; | |
cout << "3 - Library Menu" << endl; | |
cout << "Enter Selection:" << endl; | |
/*int menuInput; | |
cin >> menuInput; | |
LibraryMenu::update(menuInput);*/ | |
} | |
} |