centered main menu for asthetics
This commit is contained in:
parent
582224244d
commit
563de6fe5d
23
src/main.cpp
23
src/main.cpp
@ -33,23 +33,24 @@ int main() {
|
|||||||
char searchby = '&';
|
char searchby = '&';
|
||||||
|
|
||||||
while(tolower(quit) != 'q') {
|
while(tolower(quit) != 'q') {
|
||||||
std::cout << "========================\n";
|
std::cout << "\t\t----------=================================--------------\n";
|
||||||
std::cout << "Welcome to the Universal Hardware database!\n";
|
std::cout << "\t\t\tWelcome to the Universal Hardware database!\n";
|
||||||
std::cout << "(S)earch for a part by model name\n";
|
std::cout << "\t(S)earch for a part by model name\n";
|
||||||
std::cout << "(Q)uit hardware database\n->";
|
std::cout << "\t(Q)uit hardware database\n->";
|
||||||
std::cin >> quit;
|
std::cin >> quit;
|
||||||
switch(tolower(quit)) {
|
switch(tolower(quit)) {
|
||||||
case 's':
|
case 's':
|
||||||
std::cout << "What would you like to search by?\n";
|
std::cout << "\t\t\tWhat would you like to search by?\n";
|
||||||
std::cout << "(M)odel name\n";
|
std::cout << "\t(M)odel name\n";
|
||||||
std::cout << "Manufacture(R)\n";
|
std::cout << "\tManufacture(R)\n";
|
||||||
std::cout << "(Y)ear Released\n";
|
std::cout << "\t(Y)ear Released\n";
|
||||||
std::cout << "Main (C)lock\n";
|
std::cout << "\tMain (C)lock\n";
|
||||||
std::cout << "(Q)uit\n->";
|
std::cout << "\t(Q)uit\n->";
|
||||||
std::cin >> searchby;
|
std::cin >> searchby;
|
||||||
switch(tolower(searchby)) {
|
switch(tolower(searchby)) {
|
||||||
case 'm':
|
case 'm':
|
||||||
std::cout << "Enter search string: ";
|
std::cout << "\t\tEnter part of the model string.\n";
|
||||||
|
std::cout << "\t\tExample: for Intel i75820k you would enter 5820\n->";
|
||||||
std::cin >> msearch;
|
std::cin >> msearch;
|
||||||
msearchlower = boost::algorithm::to_lower_copy(msearch);
|
msearchlower = boost::algorithm::to_lower_copy(msearch);
|
||||||
searchTable(dbFile, msearchlower); // Replace this string with a variable that is the query grabbed from the user!
|
searchTable(dbFile, msearchlower); // Replace this string with a variable that is the query grabbed from the user!
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user